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 | 15a67e57b07f7fe3b2fa69cae82f2a7e0cf00815 (diff) |
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 *), return NULL; } + swayc_t *con; + if (container->type == C_WORKSPACE) { + for (int i = 0; i < container->floating->length; ++i) { + con = container->floating->items[i]; + if (f(con, data)) { + return con; + } + con = container_find(con, f, data); + if (con != NULL) { + return con; + } + } + } + for (int i = 0; i < container->children->length; ++i) { - if (f(container->children->items[i], data)) { - return container->children->items[i]; + con = container->children->items[i]; + if (f(con, data)) { + return con; } - swayc_t *find = container_find(container->children->items[i], f, data); - if (find != NULL) { - return find; + con = container_find(con, f, data); + if (con != NULL) { + return con; } } |