← Back to team overview

ayatana-commits team mailing list archive

[Branch ~indicator-applet-developers/indicator-applet/applet] Rev 352: Fix keybinding issue

 

Merge authors:
  Ted Gould (ted)
Related merge proposals:
  https://code.launchpad.net/~ted/indicator-applet/bug553918/+merge/22703
  proposed by: Ted Gould (ted)
  review: Approve - Cody Russell (bratsche)
------------------------------------------------------------
revno: 352 [merge]
committer: Ted Gould <ted@xxxxxxxx>
branch nick: applet
timestamp: Fri 2010-04-02 12:33:14 -0500
message:
  Fix keybinding issue
modified:
  src/applet-main.c


--
lp:indicator-applet
https://code.launchpad.net/~indicator-applet-developers/indicator-applet/applet

Your team ayatana-commits is subscribed to branch lp:indicator-applet.
To unsubscribe from this branch go to https://code.launchpad.net/~indicator-applet-developers/indicator-applet/applet/+edit-subscription
=== 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:23:20 +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;