desktop-shell: check view mappedness in desktop_surface_removed

A "mapped" surface need not have a primary output assigned, or
be in a state such that it needs a fade out animation. The view
being mapped is what we should be testing here.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2024-08-08 08:02:09 -05:00
parent a7e8bd4bea
commit 30fd16dae7
1 changed files with 1 additions and 1 deletions

View File

@ -2165,7 +2165,7 @@ desktop_surface_removed(struct weston_desktop_surface *desktop_surface,
weston_desktop_surface_set_user_data(shsurf->desktop_surface, NULL);
shsurf->desktop_surface = NULL;
if (weston_surface_is_mapped(surface) &&
if (weston_view_is_mapped(shsurf->view) &&
shsurf->shell->win_close_animation_type == ANIMATION_FADE) {
if (shsurf->shell->compositor->state == WESTON_COMPOSITOR_ACTIVE &&