diff options
author | 2021-02-19 18:41:04 +0100 | |
---|---|---|
committer | 2021-02-23 00:17:32 +0100 | |
commit | 79e43b19d795d68a3916a19d9afadc4ccbb7d4db (patch) | |
tree | 722f75603eb3f78eb4cd85a1e8ac1aeb94920e82 | |
parent | view: Recursively check mapped of view_child tree (diff) | |
download | sway-79e43b19d795d68a3916a19d9afadc4ccbb7d4db.tar.gz sway-79e43b19d795d68a3916a19d9afadc4ccbb7d4db.tar.zst sway-79e43b19d795d68a3916a19d9afadc4ccbb7d4db.zip |
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.
-rw-r--r-- | sway/tree/view.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index c8a4ea6b..978271c2 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -1105,6 +1105,9 @@ void view_child_destroy(struct sway_view_child *child) { | |||
1105 | wl_list_for_each_safe(subchild, tmpchild, &child->children, link) { | 1105 | wl_list_for_each_safe(subchild, tmpchild, &child->children, link) { |
1106 | wl_list_remove(&subchild->link); | 1106 | wl_list_remove(&subchild->link); |
1107 | subchild->parent = NULL; | 1107 | subchild->parent = NULL; |
1108 | // The subchild lost its parent link, so it cannot see that the parent | ||
1109 | // is unmapped. Unmap it directly. | ||
1110 | subchild->mapped = false; | ||
1108 | } | 1111 | } |
1109 | 1112 | ||
1110 | wl_list_remove(&child->surface_commit.link); | 1113 | wl_list_remove(&child->surface_commit.link); |