]> Dogcows Code - chaz/openbox/commitdiff
maybe this makes everyone happy, only select first entry in menus if it's not a subme...
authorMikael Magnusson <mikachu@comhem.se>
Sun, 23 Apr 2006 00:37:23 +0000 (00:37 +0000)
committerMikael Magnusson <mikachu@comhem.se>
Sun, 23 Apr 2006 00:37:23 +0000 (00:37 +0000)
openbox/menu.c

index a969da8365d05a55e229dac72d71f0437ff2703c..503876655570f93d13d9e3462c1cc8a9ed95d25b 100644 (file)
@@ -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)
This page took 0.024854 seconds and 4 git commands to generate.