surface: Assert unused subsurface views are not mapped

This is just a consistency check, nothing else.

Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Daniel Stone 2023-06-22 17:21:38 +01:00
parent 49b5df7f78
commit fc6d4392cb
1 changed files with 5 additions and 4 deletions

View File

@ -2926,10 +2926,11 @@ surface_free_unused_subsurface_views(struct weston_surface *surface)
if (sub->surface == surface)
continue;
wl_list_for_each_safe(view, nv, &sub->unused_views, surface_link) {
weston_view_unmap (view);
weston_view_destroy(view);
}
wl_list_for_each_safe(view, nv, &sub->unused_views, surface_link)
assert(!weston_view_is_mapped(view));
wl_list_insert_list(&sub->surface->views, &sub->unused_views);
wl_list_init(&sub->unused_views);
surface_free_unused_subsurface_views(sub->surface);
}