mirror of
https://github.com/swaywm/sway.git
synced 2025-11-10 13:29:51 -05:00
handle container destroy in the seat
This commit is contained in:
parent
e7ecb001d7
commit
6f7b33e691
3 changed files with 88 additions and 32 deletions
|
|
@ -401,3 +401,16 @@ bool container_has_anscestor(struct sway_container *descendant,
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool find_child_func(struct sway_container *con, void *data) {
|
||||
struct sway_container *child = data;
|
||||
return con == child;
|
||||
}
|
||||
|
||||
bool container_has_child(struct sway_container *con,
|
||||
struct sway_container *child) {
|
||||
if (child->type == C_VIEW || child->children->length == 0) {
|
||||
return false;
|
||||
}
|
||||
return container_find(con, find_child_func, child);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue