summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2020-09-23 10:59:44 -0400
committerHenry Castro <hcastro@collabora.com>2020-10-05 17:10:30 +0200
commit0566520049f561bc1e222ed78a3dc84214f65ff3 (patch)
tree9d8df6c88c8a8603459154775e86ab15f6b373f7 /sfx2
parentda24149ac681555430271f264095e2d8807c55cf (diff)
lok: sidebar: avoid deactivation when the sidebar is painting
When two views (SfxViewFrame) get activated and deactivated frequently when one view grab the focus and lose focus (respectively), in multiple user this is not true, both users have the view active at the same time. The patch removes the overhead when painting a sidebar window to avoid unnecessary deactivation. Change-Id: Ica5837c9f2eda5db1bee69ec2297e54c4845d467 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103263 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103550
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/app.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 33750b95b4ca..d240b6acecec 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -74,6 +74,7 @@
#include <eventsupplier.hxx>
#include <sfx2/dockwin.hxx>
#include <shellimpl.hxx>
+#include <comphelper/lok.hxx>
#include <unotools/saveopt.hxx>
#include <svtools/helpopt.hxx>
@@ -295,7 +296,9 @@ void SfxApplication::SetViewFrame_Impl( SfxViewFrame *pFrame )
{
if ( bTaskActivate )
NotifyEvent( SfxViewEventHint( SfxEventHintId::DeactivateDoc, GlobalEventConfig::GetEventName(GlobalEventId::DEACTIVATEDOC), pOldFrame->GetObjectShell(), pOldFrame->GetFrame().GetController() ) );
- pOldFrame->DoDeactivate( bTaskActivate, pFrame );
+
+ if ( !comphelper::LibreOfficeKit::isDialogPainting() )
+ pOldFrame->DoDeactivate( bTaskActivate, pFrame );
if( pOldFrame->GetProgress() )
pOldFrame->GetProgress()->Suspend();