From f107cada953899d4077198f4c4cc0fff62229a0a Mon Sep 17 00:00:00 2001 From: Albert Astals Date: Tue, 16 Oct 2012 12:57:42 +0200 Subject: Call gtk_menu_set_active with the position of the activated menu item Fixes interaction with GtkRecentChooserMenu (bug 752674) --- libdbusmenu-gtk/parser.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libdbusmenu-gtk') diff --git a/libdbusmenu-gtk/parser.c b/libdbusmenu-gtk/parser.c index 39cc9f8..5d49c7e 100644 --- a/libdbusmenu-gtk/parser.c +++ b/libdbusmenu-gtk/parser.c @@ -1121,6 +1121,14 @@ item_activated (DbusmenuMenuitem *item, guint timestamp, gpointer user_data) if (GTK_IS_MENU_ITEM (child)) { + GtkWidget *parent = gtk_widget_get_parent(child); + if (GTK_IS_MENU (parent)) + { + gint pos = get_child_position (child); + if (pos >= 0) + gtk_menu_set_active (GTK_MENU(parent), pos); + } + gdk_threads_enter (); gtk_menu_item_activate (GTK_MENU_ITEM (child)); gdk_threads_leave (); -- cgit v1.2.3