diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-08-06 11:27:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-06 11:27:53 -0400 |
commit | e12d1cf00382fcfdab17013921161cc661ef556d (patch) | |
tree | bfae22df29dd5cf78c60e35626056fa740f47ae0 | |
parent | Merge pull request #1300 from emersion/patch-1 (diff) | |
parent | Prevent race condition in the kill command (diff) | |
download | sway-e12d1cf00382fcfdab17013921161cc661ef556d.tar.gz sway-e12d1cf00382fcfdab17013921161cc661ef556d.tar.zst sway-e12d1cf00382fcfdab17013921161cc661ef556d.zip |
Prevent race condition in the kill command
-rw-r--r-- | sway/container.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/container.c b/sway/container.c index 125e1e3d..14647b3a 100644 --- a/sway/container.c +++ b/sway/container.c | |||
@@ -849,7 +849,6 @@ int swayc_gap(swayc_t *container) { | |||
849 | 849 | ||
850 | void container_map(swayc_t *container, void (*f)(swayc_t *view, void *data), void *data) { | 850 | void container_map(swayc_t *container, void (*f)(swayc_t *view, void *data), void *data) { |
851 | if (container) { | 851 | if (container) { |
852 | f(container, data); | ||
853 | int i; | 852 | int i; |
854 | if (container->children) { | 853 | if (container->children) { |
855 | for (i = 0; i < container->children->length; ++i) { | 854 | for (i = 0; i < container->children->length; ++i) { |
@@ -863,6 +862,7 @@ void container_map(swayc_t *container, void (*f)(swayc_t *view, void *data), voi | |||
863 | container_map(child, f, data); | 862 | container_map(child, f, data); |
864 | } | 863 | } |
865 | } | 864 | } |
865 | f(container, data); | ||
866 | } | 866 | } |
867 | } | 867 | } |
868 | 868 | ||