From 1be75fe7403fd64e084008b0ed677fa4df32ed5b Mon Sep 17 00:00:00 2001 From: Ian Fan Date: Sat, 18 Aug 2018 18:10:41 +0100 Subject: Fix double iterating in container_for_each_child --- sway/tree/container.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sway') diff --git a/sway/tree/container.c b/sway/tree/container.c index 1ceae175..9bc4f544 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -737,10 +737,10 @@ void container_for_each_child(struct sway_container *container, container->type == C_VIEW, "Expected a container or view")) { return; } - f(container, data); if (container->children) { for (int i = 0; i < container->children->length; ++i) { struct sway_container *child = container->children->items[i]; + f(child, data); container_for_each_child(child, f, data); } } -- cgit v1.2.3-54-g00ecf