summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorElias Aebi <[email protected]>2013-12-21 21:19:15 +0100
committerElias Aebi <[email protected]>2013-12-21 21:19:15 +0100
commitedcac6e05b70c25ddc5288c48c11b317f45521c1 (patch)
tree726e5fdf26c1d884e2782673da6c6a5d587c6393 /src
parent9ea434156930d3a1e9c74f239f34a76a19d2bde8 (diff)
downloadmate-indicator-applet-edcac6e05b70c25ddc5288c48c11b317f45521c1.tar.bz2
mate-indicator-applet-edcac6e05b70c25ddc5288c48c11b317f45521c1.tar.xz
make the hotkey support work again for GTK2
Diffstat (limited to 'src')
-rw-r--r--src/applet-main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/applet-main.c b/src/applet-main.c
index 4126607..995552c 100644
--- a/src/applet-main.c
+++ b/src/applet-main.c
@@ -554,6 +554,14 @@ hotkey_filter (char * keystring G_GNUC_UNUSED, gpointer data)
return;
}
+#if !GTK_CHECK_VERSION(3,0,0)
+ 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;
+ }
+#endif
+
gtk_menu_shell_select_item(GTK_MENU_SHELL(data), GTK_WIDGET(g_list_last(children)->data));
g_list_free(children);
return;