From 8c9dff014642a6e71b4890c54c1fb211344b0488 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 (cherry picked from commit c41cdcabb48eb763bbff78e5d0433b6a193db62d) --- 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 a4a0f3db..e4ffdc38 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_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) {