Merge lp:~ted/indicator-applet/bug553918 into lp:indicator-applet/0.4

Proposed by Ted Gould
Status: Merged
Merged at revision: not available
Proposed branch: lp:~ted/indicator-applet/bug553918
Merge into: lp:indicator-applet/0.4
Diff against target: 25 lines (+8/-0)
1 file modified
src/applet-main.c (+8/-0)
To merge this branch: bzr merge lp:~ted/indicator-applet/bug553918
Reviewer Review Type Date Requested Status
Cody Russell (community) Approve
Review via email: mp+22703@code.launchpad.net

Description of the change

Fixes keyboard grab issue via magic GTK code.

To post a comment you must log in.
Revision history for this message
Cody Russell (bratsche) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/applet-main.c'
2--- src/applet-main.c 2010-03-31 21:29:07 +0000
3+++ src/applet-main.c 2010-04-02 15:32:30 +0000
4@@ -334,6 +334,8 @@
5 static void
6 hotkey_filter (char * keystring, gpointer data)
7 {
8+ g_return_if_fail(GTK_IS_MENU_SHELL(data));
9+
10 /* Oh, wow, it's us! */
11 GList * children = gtk_container_get_children(GTK_CONTAINER(data));
12 if (children == NULL) {
13@@ -341,6 +343,12 @@
14 return;
15 }
16
17+ if (!GTK_MENU_SHELL(data)->active) {
18+ gtk_grab_add (GTK_WIDGET(data));
19+ GTK_MENU_SHELL(data)->have_grab = TRUE;
20+ GTK_MENU_SHELL(data)->active = TRUE;
21+ }
22+
23 gtk_menu_shell_select_item(GTK_MENU_SHELL(data), GTK_WIDGET(g_list_last(children)->data));
24 g_list_free(children);
25 return;

Subscribers

People subscribed via source and target branches

to status/vote changes: