mirror of
https://github.com/swaywm/sway.git
synced 2024-12-28 16:06:37 +01:00
parent
2aa6d98c5a
commit
5f3757c927
1 changed files with 1 additions and 1 deletions
|
@ -769,7 +769,7 @@ void container_for_each_descendant(struct sway_container *container,
|
||||||
|
|
||||||
bool container_has_ancestor(struct sway_container *descendant,
|
bool container_has_ancestor(struct sway_container *descendant,
|
||||||
struct sway_container *ancestor) {
|
struct sway_container *ancestor) {
|
||||||
while (descendant->type != C_ROOT) {
|
while (descendant && descendant->type != C_ROOT) {
|
||||||
descendant = descendant->parent;
|
descendant = descendant->parent;
|
||||||
if (descendant == ancestor) {
|
if (descendant == ancestor) {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue