From c41cdcabb48eb763bbff78e5d0433b6a193db62d Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Thu, 5 May 2022 15:32:27 +0300 Subject: [PATCH] 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 --- desktop-shell/shell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index f4b6853d..3f82b5c2 100644 --- a/desktop-shell/shell.c +++ b/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_unref(shsurf->wsurface_anim_fade); @@ -2345,7 +2346,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) {