]> Dogcows Code - chaz/openbox/blobdiff - openbox/client_list_combined_menu.c
make focus_order into one long list instead of having one per desktop. this actually...
[chaz/openbox] / openbox / client_list_combined_menu.c
index 125845de65641db414b6ebff17272157982a5028..39a8e60b3f280a4370fc4feb00112d10fe4b9bdf 100644 (file)
@@ -47,14 +47,19 @@ static void self_update(ObMenuFrame *frame, gpointer data)
     for (desktop = 0; desktop < screen_num_desktops; desktop++) {
         gboolean empty = TRUE;
 
-        menu_add_separator(menu, -1);
+        /* Don't need a separator at the very top */
+        if (desktop > 0)
+            menu_add_separator(menu, -1);
         e = menu_add_normal(menu, -1, NULL, NULL);
         e->data.normal.enabled = FALSE;
         e->data.normal.label = g_strdup(screen_desktop_names[desktop]);
+        /* The one at the bottom will always have entries below it though */
         menu_add_separator(menu, -1);
-        for (it = focus_order[desktop], i = 0; it; it = g_list_next(it), ++i) {
+        for (it = focus_order, i = 0; it; it = g_list_next(it), ++i) {
             ObClient *c = it->data;
-            if (client_normal(c) && (!c->skip_taskbar || c->iconic)) {
+            if (client_normal(c) && (!c->skip_taskbar || c->iconic) &&
+                (c->desktop == desktop || c->desktop == DESKTOP_ALL))
+            {
                 GSList *acts = NULL;
                 ObAction* act;
                 const ObClientIcon *icon;
This page took 0.020332 seconds and 4 git commands to generate.