desktop-shell: Migrate surface_unlink_view

Moving weston_desktop_surface_unlink_view() to
desktop_shell_destroy_surface() makes sure we don't leak the underlying
weston_desktop_view when tearing/shutting down the compositor.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
(cherry picked from commit c41cdcabb4)
dev
Marius Vlad 3 years ago
parent 1d95c0992b
commit 8c9dff0146
  1. 2
      desktop-shell/shell.c

@ -267,6 +267,7 @@ desktop_shell_destroy_surface(struct shell_surface *shsurf)
wl_list_init(&shsurf_child->children_link);
}
wl_list_remove(&shsurf->children_link);
weston_desktop_surface_unlink_view(shsurf->view);
wl_signal_emit(&shsurf->destroy_signal, shsurf);
weston_surface_destroy(shsurf->wsurface_anim_fade);
@ -2370,7 +2371,6 @@ desktop_surface_removed(struct weston_desktop_surface *desktop_surface,
weston_desktop_surface_set_user_data(shsurf->desktop_surface, NULL);
shsurf->desktop_surface = NULL;
weston_desktop_surface_unlink_view(shsurf->view);
if (weston_surface_is_mapped(surface) &&
shsurf->shell->win_close_animation_type == ANIMATION_FADE) {

Loading…
Cancel
Save