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.
master
Kenny Levinsen 4 years ago committed by Simon Ser
parent e7af5b6309
commit 79e43b19d7

@ -1105,6 +1105,9 @@ void view_child_destroy(struct sway_view_child *child) {
wl_list_for_each_safe(subchild, tmpchild, &child->children, link) { wl_list_for_each_safe(subchild, tmpchild, &child->children, link) {
wl_list_remove(&subchild->link); wl_list_remove(&subchild->link);
subchild->parent = NULL; 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); wl_list_remove(&child->surface_commit.link);

Loading…
Cancel
Save