ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #01390
[Merge] lp:~ted/indicator-applet/bug553918 into lp:indicator-applet
Ted Gould has proposed merging lp:~ted/indicator-applet/bug553918 into lp:indicator-applet.
Requested reviews:
Indicator Applet Developers (indicator-applet-developers)
Related bugs:
#553918 Keyboard shortcut usage blocks keyboard and other menus
https://bugs.launchpad.net/bugs/553918
Fixes keyboard grab issue via magic GTK code.
--
https://code.launchpad.net/~ted/indicator-applet/bug553918/+merge/22703
Your team ayatana-commits is subscribed to branch lp:indicator-applet.
=== modified file 'src/applet-main.c'
--- src/applet-main.c 2010-03-31 21:29:07 +0000
+++ src/applet-main.c 2010-04-02 15:31:17 +0000
@@ -334,6 +334,8 @@
static void
hotkey_filter (char * keystring, gpointer data)
{
+ g_return_if_fail(GTK_IS_MENU_SHELL(data));
+
/* Oh, wow, it's us! */
GList * children = gtk_container_get_children(GTK_CONTAINER(data));
if (children == NULL) {
@@ -341,6 +343,12 @@
return;
}
+ if (!GTK_MENU_SHELL(data)->active) {
+ gtk_grab_add (GTK_WIDGET(data));
+ GTK_MENU_SHELL(data)->have_grab = TRUE;
+ GTK_MENU_SHELL(data)->active = TRUE;
+ }
+
gtk_menu_shell_select_item(GTK_MENU_SHELL(data), GTK_WIDGET(g_list_last(children)->data));
g_list_free(children);
return;
Follow ups