diff options
author | Drew DeVault <sir@cmpwn.com> | 2016-10-12 21:54:19 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2016-10-12 21:54:19 -0400 |
commit | 56a7e5fbce3efbef203d8671fe01df695c6f0f3a (patch) | |
tree | 2c25f0bb2b0c37b28e4bcc32fb65ece10a7d9c06 | |
parent | Merge pull request #954 from SirCmpwn/revert-945-workspace_layout (diff) | |
download | sway-56a7e5fbce3efbef203d8671fe01df695c6f0f3a.tar.gz sway-56a7e5fbce3efbef203d8671fe01df695c6f0f3a.tar.zst sway-56a7e5fbce3efbef203d8671fe01df695c6f0f3a.zip |
Revert "Merge pull request #952 from SirCmpwn/revert-948-floating-titlebar-click"
This reverts commit 857eea8b6355deff7a12edd8b733f8057210142a, reversing
changes made to ce713efcd23b82a7d85c1976ddfbd46f08133ff6.
-rw-r--r-- | sway/container.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/sway/container.c b/sway/container.c index 9d5e2690..4f22eb0d 100644 --- a/sway/container.c +++ b/sway/container.c | |||
@@ -727,14 +727,29 @@ swayc_t *container_find(swayc_t *container, bool (*f)(swayc_t *, const void *), | |||
727 | return NULL; | 727 | return NULL; |
728 | } | 728 | } |
729 | 729 | ||
730 | swayc_t *con; | ||
731 | if (container->type == C_WORKSPACE) { | ||
732 | for (int i = 0; i < container->floating->length; ++i) { | ||
733 | con = container->floating->items[i]; | ||
734 | if (f(con, data)) { | ||
735 | return con; | ||
736 | } | ||
737 | con = container_find(con, f, data); | ||
738 | if (con != NULL) { | ||
739 | return con; | ||
740 | } | ||
741 | } | ||
742 | } | ||
743 | |||
730 | for (int i = 0; i < container->children->length; ++i) { | 744 | for (int i = 0; i < container->children->length; ++i) { |
731 | if (f(container->children->items[i], data)) { | 745 | con = container->children->items[i]; |
732 | return container->children->items[i]; | 746 | if (f(con, data)) { |
747 | return con; | ||
733 | } | 748 | } |
734 | 749 | ||
735 | swayc_t *find = container_find(container->children->items[i], f, data); | 750 | con = container_find(con, f, data); |
736 | if (find != NULL) { | 751 | if (con != NULL) { |
737 | return find; | 752 | return con; |
738 | } | 753 | } |
739 | } | 754 | } |
740 | 755 | ||