diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-06-07 13:16:26 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-06-07 13:18:37 +0100 |
commit | c450705d51a4fe67d1e9391b2f78235b79766cfe (patch) | |
tree | 274a4d9226e2bae532e67b35161589809eb90dea /vcl | |
parent | b5ad72bbfca85946e352b56d9d2ee5eb71cd2132 (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.cxx | 16 |
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) |