summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/xmenu.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index ca0bcdf7d23..c89fe86e3da 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -884,11 +884,12 @@ If FRAME is nil or not given, use the selected frame. */)
/* Activate the first menu. */
GList *children = gtk_container_get_children (GTK_CONTAINER (menubar));
- gtk_menu_shell_select_item (GTK_MENU_SHELL (menubar),
- GTK_WIDGET (children->data));
-
- popup_activated_flag = 1;
- g_list_free (children);
+ if (children)
+ {
+ g_signal_emit_by_name (children->data, "activate_item");
+ popup_activated_flag = 1;
+ g_list_free (children);
+ }
}
UNBLOCK_INPUT;