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 <pekka.paalanen@collabora.com>
This commit is contained in:
Pekka Paalanen 2021-05-14 14:37:46 +03:00
parent 8740037a93
commit 4bb326bc8c
1 changed files with 10 additions and 1 deletions

View File

@ -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);
}