From 5648f0d75c22c817c740a9345e50dfd2ac2f6ffc Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sun, 23 Apr 2006 00:37:23 +0000 Subject: [PATCH] maybe this makes everyone happy, only select first entry in menus if it's not a submenu entry --- openbox/menu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/openbox/menu.c b/openbox/menu.c index a969da83..50387665 100644 --- a/openbox/menu.c +++ b/openbox/menu.c @@ -315,8 +315,12 @@ void menu_show(gchar *name, gint x, gint y, ObClient *client) } if (!menu_frame_show(frame, NULL)) menu_frame_free(frame); - else if (frame->entries) - menu_frame_select_next(frame); + else if (frame->entries) { + ObMenuEntryFrame *e = frame->entries->data; + if (e->entry->type == OB_MENU_ENTRY_TYPE_NORMAL && + e->entry->data.normal.enabled) + menu_frame_select(frame, e); + } } static ObMenuEntry* menu_entry_new(ObMenu *menu, ObMenuEntryType type, gint id) -- 2.45.2