diff options
-rw-r--r-- | vcl/source/window/winproc.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 3f94d112b751..03c73072c5a5 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -1898,8 +1898,10 @@ static void ImplHandleLoseFocus( vcl::Window* pWindow ) // Make sure that no menu is visible when a toplevel window loses focus. VclPtr<FloatingWindow> pFirstFloat = pSVData->mpWinData->mpFirstFloat; - if (pFirstFloat && !pWindow->GetParent()) + if (pFirstFloat && pFirstFloat->IsMenuFloatingWindow() && !pWindow->GetParent()) + { pFirstFloat->EndPopupMode(FloatWinPopupEndFlags::Cancel | FloatWinPopupEndFlags::CloseAll); + } } namespace { |