[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sfx2/source

Henry Castro (via logerrit) logerrit at kemper.freedesktop.org
Mon Sep 28 12:33:00 UTC 2020


 sfx2/source/appl/app.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 0a8be32f6130a4b84cd3f9ca70f6109dd78bf434
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Wed Sep 23 10:59:44 2020 -0400
Commit:     Henry Castro <hcastro at collabora.com>
CommitDate: Mon Sep 28 14:32:27 2020 +0200

    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 at gmail.com>
    Reviewed-by: Henry Castro <hcastro at collabora.com>

diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 29162c725522..2bf0e9785555 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -73,6 +73,7 @@
 #include <eventsupplier.hxx>
 #include <sfx2/dockwin.hxx>
 #include <shellimpl.hxx>
+#include <comphelper/lok.hxx>
 
 #include <unotools/saveopt.hxx>
 #include <svtools/helpopt.hxx>
@@ -296,7 +297,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();


More information about the Libreoffice-commits mailing list