sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 857eea8b6355deff7a12edd8b733f8057210142a
parent ce713efcd23b82a7d85c1976ddfbd46f08133ff6
Author: Drew DeVault <sir@cmpwn.com>
Date:   Wed, 12 Oct 2016 12:27:50 -0400

Merge pull request #952 from SirCmpwn/revert-948-floating-titlebar-click

Revert "also check floating cons in container_find"
Diffstat:
Msway/container.c | 25+++++--------------------
1 file changed, 5 insertions(+), 20 deletions(-)

diff --git 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 *), 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) { - con = container->children->items[i]; - if (f(con, data)) { - return con; + if (f(container->children->items[i], data)) { + return container->children->items[i]; } - con = container_find(con, f, data); - if (con != NULL) { - return con; + swayc_t *find = container_find(container->children->items[i], f, data); + if (find != NULL) { + return find; } }