aboutsummaryrefslogtreecommitdiff
path: root/sway/tree
diff options
context:
space:
mode:
authorRyan Dwyer <RyanDwyer@users.noreply.github.com>2018-08-19 08:59:00 +1000
committerGitHub <noreply@github.com>2018-08-19 08:59:00 +1000
commit373f0254a8d28511897e19ada1487b9115fc2019 (patch)
tree50564536b73fac3147186ff2c562289df8a4b3f2 /sway/tree
parent744724b3cb28c2ee9d265dcbf78b1cbf2b2e3fef (diff)
parent1be75fe7403fd64e084008b0ed677fa4df32ed5b (diff)
Merge pull request #2484 from ianyfan/con-for-each-child-fix
Fix double iterating in container_for_each_child
Diffstat (limited to 'sway/tree')
-rw-r--r--sway/tree/container.c2
1 files changed, 1 insertions, 1 deletions
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);
}
}