]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: Correctly open workspaces on additional outputs
authorMichael Stapelberg <michael@stapelberg.de>
Mon, 21 Feb 2011 00:12:22 +0000 (01:12 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Mon, 21 Feb 2011 00:12:22 +0000 (01:12 +0100)
src/randr.c

index 9abe9c7c1d0819a1798b9567956e1d0c8d88cff5..a49675cc0ba520cd8f2f1572bb2d0033334698b1 100644 (file)
@@ -306,7 +306,7 @@ void output_init_con(Output *output) {
     int c = 0;
     bool exists = true;
     while (exists) {
-        Con *out, *current;
+        Con *out, *current, *child;
 
         c++;
 
@@ -316,11 +316,16 @@ void output_init_con(Output *output) {
         exists = false;
         TAILQ_FOREACH(out, &(croot->nodes_head), nodes) {
             TAILQ_FOREACH(current, &(out->nodes_head), nodes) {
-                if (strcasecmp(current->name, ws->name) != 0)
+                if (current->type != CT_CON)
                     continue;
 
-                exists = true;
-                break;
+                TAILQ_FOREACH(child, &(current->nodes_head), nodes) {
+                    if (strcasecmp(child->name, ws->name) != 0)
+                        continue;
+
+                    exists = true;
+                    break;
+                }
             }
         }