diff options
-rw-r--r-- | sway/container.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sway/container.c b/sway/container.c index 5321e3cd..fda90e5b 100644 --- a/sway/container.c +++ b/sway/container.c | |||
@@ -152,7 +152,7 @@ swayc_t *new_workspace(swayc_t *output, const char *name) { | |||
152 | workspace->width = output->width; | 152 | workspace->width = output->width; |
153 | workspace->height = output->height; | 153 | workspace->height = output->height; |
154 | workspace->name = strdup(name); | 154 | workspace->name = strdup(name); |
155 | workspace->visible = true; | 155 | workspace->visible = false; |
156 | workspace->floating = create_list(); | 156 | workspace->floating = create_list(); |
157 | 157 | ||
158 | add_child(output, workspace); | 158 | add_child(output, workspace); |
@@ -503,18 +503,17 @@ bool swayc_is_active(swayc_t *view) { | |||
503 | 503 | ||
504 | void container_map(swayc_t *container, void (*f)(swayc_t *view, void *data), void *data) { | 504 | void container_map(swayc_t *container, void (*f)(swayc_t *view, void *data), void *data) { |
505 | if (container) { | 505 | if (container) { |
506 | f(container, data); | ||
506 | int i; | 507 | int i; |
507 | if (container->children) { | 508 | if (container->children) { |
508 | for (i = 0; i < container->children->length; ++i) { | 509 | for (i = 0; i < container->children->length; ++i) { |
509 | swayc_t *child = container->children->items[i]; | 510 | swayc_t *child = container->children->items[i]; |
510 | f(child, data); | ||
511 | container_map(child, f, data); | 511 | container_map(child, f, data); |
512 | } | 512 | } |
513 | } | 513 | } |
514 | if (container->floating) { | 514 | if (container->floating) { |
515 | for (i = 0; i < container->floating->length; ++i) { | 515 | for (i = 0; i < container->floating->length; ++i) { |
516 | swayc_t *child = container->floating->items[i]; | 516 | swayc_t *child = container->floating->items[i]; |
517 | f(child, data); | ||
518 | container_map(child, f, data); | 517 | container_map(child, f, data); |
519 | } | 518 | } |
520 | } | 519 | } |