diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2016-08-29 13:29:28 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2016-08-29 13:43:06 +0300 |
commit | ab67543e09568368b41faf3510841a1dd48b993f (patch) | |
tree | 079ba1559f9c0ef020f7bd43e109bf863c1e1eaa /vcl | |
parent | 1d3bb054b2f69f3af5ba49f0cf5ff8c7ac72f625 (diff) |
Toolbar popups need explicit deactivation
... if based on MenuBarManager, because unlike context
menus, we reuse the same menu instead of creating from
scratch each time, so that it suffers from the same
"double activation" problem as in tdf#97665.
Note that for GtkSalMenu the problem is only for the
top level popup menu, as the Deactivate callback is
properly called when sub menus are closed.
The non-native case also had this problem, but only when
closing the menu by selecting one of its items, and was
fixed already in b41deb2ef057c3bd43fa61448bb4d7299138c8d4.
Change-Id: Iee037f7baba0f80c32fb3a45f16511f8585c203e
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/osx/salnsmenu.mm | 1 | ||||
-rw-r--r-- | vcl/unx/gtk/gtksalmenu.cxx | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/vcl/osx/salnsmenu.mm b/vcl/osx/salnsmenu.mm index cd22b7865592..be772f92b0cb 100644 --- a/vcl/osx/salnsmenu.mm +++ b/vcl/osx/salnsmenu.mm @@ -58,6 +58,7 @@ else if( mpMenu->mpVCLMenu ) { mpMenu->mpVCLMenu->Activate(); + mpMenu->mpVCLMenu->Deactivate(); // Hide disabled items NSArray* elements = [pMenu itemArray]; diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx index 75c19c3e943b..8856410448fe 100644 --- a/vcl/unx/gtk/gtksalmenu.cxx +++ b/vcl/unx/gtk/gtksalmenu.cxx @@ -399,6 +399,8 @@ bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, const Rectangle& rRec } g_main_loop_unref(pLoop); + mpVCLMenu->Deactivate(); + gtk_widget_insert_action_group(mpFrame->getMouseEventWidget(), "win", nullptr); gtk_widget_destroy(pWidget); |