aboutsummaryrefslogtreecommitdiffstats
path: root/sway
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2016-10-12 12:19:02 -0400
committerLibravatar GitHub <noreply@github.com>2016-10-12 12:19:02 -0400
commitf30f60dad8c60c41c0aa8834d81a3f5127f2c154 (patch)
tree13d40041fc41a2ba8d4f03ce403395334f8397d4 /sway
parentMerge pull request #945 from thejan2009/workspace_layout (diff)
downloadsway-f30f60dad8c60c41c0aa8834d81a3f5127f2c154.tar.gz
sway-f30f60dad8c60c41c0aa8834d81a3f5127f2c154.tar.zst
sway-f30f60dad8c60c41c0aa8834d81a3f5127f2c154.zip
Revert "also check floating cons in container_find"
Diffstat (limited to 'sway')
-rw-r--r--sway/container.c25
1 files changed, 5 insertions, 20 deletions
diff --git a/sway/container.c b/sway/container.c
index c588f3db..c3461acb 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -729,29 +729,14 @@ swayc_t *container_find(swayc_t *container, bool (*f)(swayc_t *, const void *),
729 return NULL; 729 return NULL;
730 } 730 }
731 731
732 swayc_t *con;
733 if (container->type == C_WORKSPACE) {
734 for (int i = 0; i < container->floating->length; ++i) {
735 con = container->floating->items[i];
736 if (f(con, data)) {
737 return con;
738 }
739 con = container_find(con, f, data);
740 if (con != NULL) {
741 return con;
742 }
743 }
744 }
745
746 for (int i = 0; i < container->children->length; ++i) { 732 for (int i = 0; i < container->children->length; ++i) {
747 con = container->children->items[i]; 733 if (f(container->children->items[i], data)) {
748 if (f(con, data)) { 734 return container->children->items[i];
749 return con;
750 } 735 }
751 736
752 con = container_find(con, f, data); 737 swayc_t *find = container_find(container->children->items[i], f, data);
753 if (con != NULL) { 738 if (find != NULL) {
754 return con; 739 return find;
755 } 740 }
756 } 741 }
757 742