diff options
author | Cody Russell <crussell@canonical.com> | 2010-08-30 16:13:06 -0400 |
---|---|---|
committer | Cody Russell <crussell@canonical.com> | 2010-08-30 16:13:06 -0400 |
commit | cbb0f2c5ae4381b2627fcfb9fe7a57d80460ec44 (patch) | |
tree | 6505b1ac8a896f9f7a7378ce2f92967d16b33834 /libdbusmenu-gtk | |
parent | 15501ea22301d17dc7d193f1ece226ee657e59c3 (diff) | |
download | libdbusmenu-cbb0f2c5ae4381b2627fcfb9fe7a57d80460ec44.tar.gz libdbusmenu-cbb0f2c5ae4381b2627fcfb9fe7a57d80460ec44.tar.bz2 libdbusmenu-cbb0f2c5ae4381b2627fcfb9fe7a57d80460ec44.zip |
Grab your junk.
Diffstat (limited to 'libdbusmenu-gtk')
-rw-r--r-- | libdbusmenu-gtk/client.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index 44f95fe..72f5b0b 100644 --- a/libdbusmenu-gtk/client.c +++ b/libdbusmenu-gtk/client.c @@ -447,18 +447,26 @@ activate_helper (GtkMenuShell * shell) GtkWidget * attach = gtk_menu_get_attach_widget(GTK_MENU(shell)); if (attach != NULL) { - GtkWidget * parent = gtk_widget_get_parent(GTK_WIDGET(attach)); + GtkWidget * parent = gtk_widget_get_parent(attach); + GtkWidget *toplevel = gtk_widget_get_toplevel (attach); if (parent != NULL) { if (GTK_IS_MENU(parent)) { activate_helper(GTK_MENU_SHELL(parent)); } + + if (!GTK_MENU_SHELL (parent)->active) { + gtk_grab_add (parent); + GTK_MENU_SHELL (parent)->have_grab = TRUE; + GTK_MENU_SHELL (parent)->active = TRUE; + } + gtk_menu_shell_select_item(GTK_MENU_SHELL(parent), attach); } } } - return; + return; } /* Signaled when we should show a menuitem at request of the application |