From c30cb29248bbf78db486a1369c96e79ddd24c07b Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Mon, 2 Aug 2021 15:47:16 +0300 Subject: [PATCH] desktop-shell: Use weston_surface_destroy() directly Follow-up from commit 'desktop-shell: don't run fade animation if compositor is inactive' where the reference was dropped directly, instead of using weston_surface_destroy(). Signed-off-by: Marius Vlad --- desktop-shell/shell.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 96289ae4..caaca316 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -2474,11 +2474,11 @@ desktop_surface_removed(struct weston_desktop_surface *desktop_surface, fade_out_done, shsurf); return; } else { - --surface->ref_count; + weston_surface_destroy(surface); } } - weston_surface_destroy(surface); + weston_view_destroy(shsurf->view); if (shsurf->output_destroy_listener.notify) { wl_list_remove(&shsurf->output_destroy_listener.link);