From 4bb326bc8cf6a47d5a1dd11ee68facb4bc4bba40 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Fri, 14 May 2021 14:37:46 +0300 Subject: [PATCH] desktop-shell: call weston_layer_fini() This ensures the layers are torn down properly. See commit: libweston: add weston_layer_fini() Signed-off-by: Pekka Paalanen --- desktop-shell/shell.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index c1c126e8..53abc596 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -894,6 +894,8 @@ workspace_destroy(struct workspace *ws) if (ws->fsurf_back) focus_surface_destroy(ws->fsurf_back); + weston_layer_fini(&ws->layer); + free(ws); } @@ -4632,7 +4634,7 @@ switcher_binding(struct weston_keyboard *keyboard, const struct timespec *time, switcher = malloc(sizeof *switcher); if (!switcher) return; - + switcher->shell = shell; switcher->current = NULL; switcher->listener.notify = switcher_handle_view_destroy; @@ -5026,6 +5028,13 @@ shell_destroy(struct wl_listener *listener, void *data) workspace_destroy(*ws); wl_array_release(&shell->workspaces.array); + weston_layer_fini(&shell->fullscreen_layer); + weston_layer_fini(&shell->panel_layer); + weston_layer_fini(&shell->background_layer); + weston_layer_fini(&shell->lock_layer); + weston_layer_fini(&shell->input_panel_layer); + weston_layer_fini(&shell->minimized_layer); + free(shell->client); free(shell); }