sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 6bbfd65735ba17ee55ee90b7021c70d68f27b55a
parent 873a51f7e263aaf5922c8ca69f3784c97330b691
Author: minus <minus@mnus.de>
Date:   Thu, 27 Aug 2015 00:44:47 +0200

fixed container_map

applies to the passed in container now as well.
fixes workspaces staying always marked visible.
also set workspaces to not visible by default; happens when you move a
container to a new workspace that thus is not visible

Diffstat:
Msway/container.c | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sway/container.c b/sway/container.c @@ -152,7 +152,7 @@ swayc_t *new_workspace(swayc_t *output, const char *name) { workspace->width = output->width; workspace->height = output->height; workspace->name = strdup(name); - workspace->visible = true; + workspace->visible = false; workspace->floating = create_list(); add_child(output, workspace); @@ -503,18 +503,17 @@ bool swayc_is_active(swayc_t *view) { void container_map(swayc_t *container, void (*f)(swayc_t *view, void *data), void *data) { if (container) { + f(container, data); int i; if (container->children) { for (i = 0; i < container->children->length; ++i) { swayc_t *child = container->children->items[i]; - f(child, data); container_map(child, f, data); } } if (container->floating) { for (i = 0; i < container->floating->length; ++i) { swayc_t *child = container->floating->items[i]; - f(child, data); container_map(child, f, data); } }