Merge branches 'wip/edges', 'mikabox/crap', 'mikabox/lock', 'mikabox/maybe' and ...
[mikachu/openbox.git] / openbox / client_list_combined_menu.c
index dfae21e..9c98d93 100644 (file)
@@ -54,6 +54,7 @@ static gboolean self_update(ObMenuFrame *frame, gpointer data)
     for (desktop_it = 0; desktop_it < screen_num_desktops; desktop_it++) {
         gboolean empty = TRUE;
         gboolean onlyiconic = TRUE;
+        gboolean noicons = TRUE;
         
         desktop = desktop_it;
         if (desktop == 0)
@@ -71,9 +72,11 @@ static gboolean self_update(ObMenuFrame *frame, gpointer data)
                 empty = FALSE;
 
                 if (c->iconic) {
-                    gchar *title = g_strdup_printf("(%s)", c->icon_title);
-                    e = menu_add_normal(menu, desktop, title, NULL, FALSE);
-                    g_free(title);
+                    if (noicons) {
+                        menu_add_separator(menu, -1, NULL);
+                        noicons = FALSE;
+                    }
+                    e = menu_add_normal(menu, desktop, c->icon_title, NULL, FALSE);
                 } else {
                     onlyiconic = FALSE;
                     e = menu_add_normal(menu, desktop, c->title, NULL, FALSE);
@@ -125,7 +128,7 @@ static void menu_execute(ObMenuEntry *self, ObMenuFrame *f,
     }
     else {
         ObClient *t = self->data.normal.data;
-        if (t) { /* it's set to NULL if its destroyed */
+        if (t && !t->locked) { /* it's set to NULL if its destroyed */
             gboolean here = state & ShiftMask;
 
             client_activate(t, TRUE, here, TRUE, TRUE, TRUE);