summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2019-12-12 01:44:23 +0000
committerAshod Nakashian <ashnakash@gmail.com>2019-12-12 03:36:31 +0100
commit19722a41a2f3f9231702f9508840b6124d290a0a (patch)
tree0dea22184078625322540f77c098ed9433194f47 /vcl
parent435659fd7e401353fc114246813b811190362293 (diff)
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 <ashnakash@gmail.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/floatwin.cxx9
1 files changed, 6 insertions, 3 deletions
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;