aboutsummaryrefslogtreecommitdiff
path: root/sway/tree/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/tree/node.c')
-rw-r--r--sway/tree/node.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sway/tree/node.c b/sway/tree/node.c
index dcab1c9b..ffa7f2cc 100644
--- a/sway/tree/node.c
+++ b/sway/tree/node.c
@@ -142,11 +142,19 @@ list_t *node_get_children(struct sway_node *node) {
}
bool node_has_ancestor(struct sway_node *node, struct sway_node *ancestor) {
+ if (ancestor->type == N_ROOT && node->type == N_CONTAINER &&
+ node->sway_container->fullscreen_mode == FULLSCREEN_GLOBAL) {
+ return true;
+ }
struct sway_node *parent = node_get_parent(node);
while (parent) {
if (parent == ancestor) {
return true;
}
+ if (ancestor->type == N_ROOT && parent->type == N_CONTAINER &&
+ parent->sway_container->fullscreen_mode == FULLSCREEN_GLOBAL) {
+ return true;
+ }
parent = node_get_parent(parent);
}
return false;