vcl/source/window/floatwin.cxx |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 19722a41a2f3f9231702f9508840b6124d290a0a
Author:     Michael Meeks <michael.me...@collabora.com>
AuthorDate: Thu Dec 12 01:44:23 2019 +0000
Commit:     Ashod Nakashian <ashnak...@gmail.com>
CommitDate: Thu Dec 12 03:36:31 2019 +0100

    lok: vcl: fix multiple floatwin removal case.
    
    We need to progress in our while loop to remove children, even if
    they are currently not in popup-mode; fixes infinite loop with two
    popups present concurrently.
    
    Change-Id: I4926ef8c88152dbf532ccd3fdb8e28ca2d0c62d3
    Reviewed-on: https://gerrit.libreoffice.org/85000
    Reviewed-by: Ashod Nakashian <ashnak...@gmail.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index bef5dfc13069..55784bdb2aa2 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -818,9 +818,6 @@ void FloatingWindow::StartPopupMode( ToolBox* pBox, 
FloatWinPopupFlags nFlags )
 
 void FloatingWindow::ImplEndPopupMode( FloatWinPopupEndFlags nFlags, const 
VclPtr<vcl::Window>& xFocusId )
 {
-    if ( !mbInPopupMode )
-        return;
-
     ImplSVData* pSVData = ImplGetSVData();
 
     mbInCleanUp = true; // prevent killing this window due to focus change 
while working with it
@@ -833,6 +830,12 @@ void FloatingWindow::ImplEndPopupMode( 
FloatWinPopupEndFlags nFlags, const VclPt
     pSVData->mpWinData->mpFirstFloat = mpNextFloat;
     mpNextFloat = nullptr;
 
+    if ( !mbInPopupMode )
+    {
+        mbInCleanUp = false;
+        return;
+    }
+
     FloatWinPopupFlags nPopupModeFlags = mnPopupModeFlags;
     mbPopupModeTearOff = nFlags & FloatWinPopupEndFlags::TearOff &&
                          nPopupModeFlags & FloatWinPopupFlags::AllowTearOff;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to