From edcac6e05b70c25ddc5288c48c11b317f45521c1 Mon Sep 17 00:00:00 2001 From: Elias Aebi Date: Sat, 21 Dec 2013 21:19:15 +0100 Subject: make the hotkey support work again for GTK2 --- src/applet-main.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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; -- cgit v1.2.1