[Libreoffice-commits] core.git: vcl/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Tue Mar 30 07:04:26 UTC 2021
vcl/source/window/winproc.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit d4ed266849b558b041acb740a18bd81fa39bc582
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Mar 29 20:57:07 2021 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue Mar 30 09:03:42 2021 +0200
tdf#133350 vcl focus loss: fix unwanted cancel of non-menu popup
Regression from commit f21d2b48bd68424a96aa6cd5572e368208378291
(tdf#121723 vcl: leave popup mode on focus loss of toplevel windows,
2018-11-26), the original motivation was to cancel menu popus (toplevel
window menus, context menus).
Fix the unwanted cancel of ImplPopupFloatWin/ImplListBoxFloatingWindow
by restricting the cancel to menu floating windows. This keeps the
original bug fixed and allows setting e.g. the font size in the
toolbar's popup part.
Change-Id: Ida503d0c13dc5a96287bfa31b6c2ce9d4a53e940
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113326
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
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 {
More information about the Libreoffice-commits
mailing list