summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-06-07 13:16:26 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-06-07 13:18:37 +0100
commitc450705d51a4fe67d1e9391b2f78235b79766cfe (patch)
tree274a4d9226e2bae532e67b35161589809eb90dea /vcl
parentb5ad72bbfca85946e352b56d9d2ee5eb71cd2132 (diff)
gtk3: wrongly activating the parent menu and not the desired child
Change-Id: I57193a424b5f19a59e98bdfe26e0cab38d4204ea
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/gtk/gtksalmenu.cxx16
1 files changed, 10 insertions, 6 deletions
diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx
index 70a4130d1bf9..a13bb6d26242 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)