[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - vcl/unx
Caolán McNamara
caolanm at redhat.com
Tue Jun 7 12:22:00 UTC 2016
vcl/unx/gtk/gtksalmenu.cxx | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
New commits:
commit 3760679a6d0169231f04ad174eeaba6cd66d6e39
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 7 13:16:26 2016 +0100
gtk3: wrongly activating the parent menu and not the desired child
Change-Id: I57193a424b5f19a59e98bdfe26e0cab38d4204ea
(cherry picked from commit c450705d51a4fe67d1e9391b2f78235b79766cfe)
diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx
index 414b6b0..24ab303 100644
--- a/vcl/unx/gtk/gtksalmenu.cxx
+++ b/vcl/unx/gtk/gtksalmenu.cxx
@@ -1020,17 +1020,21 @@ void GtkSalMenu::ClearActionGroupAndMenuModel()
void GtkSalMenu::Activate(const gchar* pCommand)
{
MenuAndId aMenuAndId = decode_command(pCommand);
- GtkSalMenu* pSalSubMenu = aMenuAndId.first;
- GtkSalMenu* pTopLevel = pSalSubMenu->GetTopLevel();
- pTopLevel->GetMenu()->HandleMenuActivateEvent(pSalSubMenu->GetMenu());
+ GtkSalMenu* pSalMenu = aMenuAndId.first;
+ GtkSalMenu* pTopLevel = pSalMenu->GetTopLevel();
+ Menu* pVclMenu = pSalMenu->GetMenu();
+ Menu* pVclSubMenu = pVclMenu->GetPopupMenu(aMenuAndId.second);
+ pTopLevel->GetMenu()->HandleMenuActivateEvent(pVclSubMenu);
}
void GtkSalMenu::Deactivate(const gchar* pCommand)
{
MenuAndId aMenuAndId = decode_command(pCommand);
- GtkSalMenu* pSalSubMenu = aMenuAndId.first;
- GtkSalMenu* pTopLevel = pSalSubMenu->GetTopLevel();
- pTopLevel->GetMenu()->HandleMenuDeActivateEvent(pSalSubMenu->GetMenu());
+ GtkSalMenu* pSalMenu = aMenuAndId.first;
+ GtkSalMenu* pTopLevel = pSalMenu->GetTopLevel();
+ Menu* pVclMenu = pSalMenu->GetMenu();
+ Menu* pVclSubMenu = pVclMenu->GetPopupMenu(aMenuAndId.second);
+ pTopLevel->GetMenu()->HandleMenuDeActivateEvent(pVclSubMenu);
}
void GtkSalMenu::EnableUnity(bool bEnable)
More information about the Libreoffice-commits
mailing list