aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-gtk
diff options
context:
space:
mode:
Diffstat (limited to 'libdbusmenu-gtk')
-rw-r--r--libdbusmenu-gtk/parser.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libdbusmenu-gtk/parser.c b/libdbusmenu-gtk/parser.c
index 778491d..6244b07 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 ();