diff options
Diffstat (limited to 'vcl/source/window/winproc.cxx')
-rw-r--r-- | vcl/source/window/winproc.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index ea29c4a265d7..add5c3b45957 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -1842,6 +1842,11 @@ static void ImplHandleLoseFocus( vcl::Window* pWindow ) vcl::Window* pFocusWin = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin; if ( pFocusWin && pFocusWin->ImplGetWindowImpl()->mpCursor ) pFocusWin->ImplGetWindowImpl()->mpCursor->ImplHide(); + + // Make sure that no menu is visible when a toplevel window loses focus. + VclPtr<FloatingWindow> pFirstFloat = pSVData->maWinData.mpFirstFloat; + if (pFirstFloat && !pWindow->GetParent()) + pFirstFloat->EndPopupMode(FloatWinPopupEndFlags::Cancel | FloatWinPopupEndFlags::CloseAll); } struct DelayedCloseEvent |