From 0ebbf8d910591c8c26faac5520886723b1cbc7f3 Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Fri, 19 Feb 2021 18:41:04 +0100 Subject: [PATCH] view: Mark subchildren as unmapped in view_child_destroy The subchildren lose their parent association at this point, so they will not be able to see that the parent is unmapped. Instead, just set the subchildren to be unmapped directly. (cherry picked from commit 79e43b19d795d68a3916a19d9afadc4ccbb7d4db) --- sway/tree/view.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sway/tree/view.c b/sway/tree/view.c index d77bd07d5..e8e8580af 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -1029,6 +1029,9 @@ void view_child_destroy(struct sway_view_child *child) { wl_list_for_each_safe(subchild, tmpchild, &child->children, link) { wl_list_remove(&subchild->link); subchild->parent = NULL; + // The subchild lost its parent link, so it cannot see that the parent + // is unmapped. Unmap it directly. + subchild->mapped = false; } wl_list_remove(&child->surface_commit.link);