view: Destroy subsurface views with their parents

When we're destroying a parent view, also destroy any of its children
which are subsurface views that we've created automatically in the core.

Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Daniel Stone 2023-06-27 06:44:47 +01:00
parent fc776c3b59
commit 4b7fb56835

View file

@ -1778,7 +1778,11 @@ transform_parent_handle_parent_destroy(struct wl_listener *listener,
geometry.parent_destroy_listener);
weston_view_set_transform_parent(view, NULL);
view->parent_view = NULL;
/* Destroy any child views which were automatically created for a
* subsurface when the parent view is destroyed. */
if (view->parent_view)
weston_view_destroy(view);
}
WL_EXPORT void