Bugfix: Correctly open workspaces on additional outputs

This commit is contained in:
Michael Stapelberg 2011-02-21 01:12:22 +01:00
parent 6b272fea55
commit a33d869885
1 changed files with 9 additions and 4 deletions

View 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,13 +316,18 @@ 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;
TAILQ_FOREACH(child, &(current->nodes_head), nodes) {
if (strcasecmp(child->name, ws->name) != 0)
continue;
exists = true;
break;
}
}
}
DLOG("result for ws %s / %d: exists = %d\n", ws->name, c, exists);
}