From: Mikael Magnusson Date: Sun, 23 Apr 2006 00:37:23 +0000 (+0000) Subject: maybe this makes everyone happy, only select first entry in menus if it's not a subme... X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=5648f0d75c22c817c740a9345e50dfd2ac2f6ffc;p=chaz%2Fopenbox maybe this makes everyone happy, only select first entry in menus if it's not a submenu entry --- 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)