mirror of
https://github.com/swaywm/sway.git
synced 2024-11-26 18:01:29 +00:00
Merge pull request #948 from thejan2009/floating-titlebar-click
also check floating cons in container_find
This commit is contained in:
commit
9ad6fc592d
|
@ -727,14 +727,29 @@ swayc_t *container_find(swayc_t *container, bool (*f)(swayc_t *, const void *),
|
||||||
return NULL;
|
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) {
|
for (int i = 0; i < container->children->length; ++i) {
|
||||||
if (f(container->children->items[i], data)) {
|
con = container->children->items[i];
|
||||||
return container->children->items[i];
|
if (f(con, data)) {
|
||||||
|
return con;
|
||||||
}
|
}
|
||||||
|
|
||||||
swayc_t *find = container_find(container->children->items[i], f, data);
|
con = container_find(con, f, data);
|
||||||
if (find != NULL) {
|
if (con != NULL) {
|
||||||
return find;
|
return con;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue