aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/view.c
diff options
context:
space:
mode:
authorLibravatar Kenny Levinsen <kl@kl.wtf>2021-02-19 18:41:04 +0100
committerLibravatar Simon Ser <contact@emersion.fr>2021-05-19 11:48:08 +0200
commitec1c8143b067772f2bdc2592ad28ef6da37af36b (patch)
treec5e55f117a104de22d040060acb9a3ddc0ca1711 /sway/tree/view.c
parentview: Recursively check mapped of view_child tree (diff)
downloadsway-ec1c8143b067772f2bdc2592ad28ef6da37af36b.tar.gz
sway-ec1c8143b067772f2bdc2592ad28ef6da37af36b.tar.zst
sway-ec1c8143b067772f2bdc2592ad28ef6da37af36b.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. (cherry picked from commit 79e43b19d795d68a3916a19d9afadc4ccbb7d4db)
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r--sway/tree/view.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index d77bd07d..e8e8580a 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -1029,6 +1029,9 @@ void view_child_destroy(struct sway_view_child *child) {
1029 wl_list_for_each_safe(subchild, tmpchild, &child->children, link) { 1029 wl_list_for_each_safe(subchild, tmpchild, &child->children, link) {
1030 wl_list_remove(&subchild->link); 1030 wl_list_remove(&subchild->link);
1031 subchild->parent = NULL; 1031 subchild->parent = NULL;
1032 // The subchild lost its parent link, so it cannot see that the parent
1033 // is unmapped. Unmap it directly.
1034 subchild->mapped = false;
1032 } 1035 }
1033 1036
1034 wl_list_remove(&child->surface_commit.link); 1037 wl_list_remove(&child->surface_commit.link);