From 9706a807f941e1c37dafce714c0accafc17b9ceb Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Fri, 14 May 2021 14:55:26 +0300 Subject: [PATCH] ivi-shell: call weston_layer_fini() This ensures the layers are torn down properly. See commit: libweston: add weston_layer_fini() There would be a lot more to tear down here, but that is for another time. Signed-off-by: Pekka Paalanen --- ivi-shell/ivi-layout-shell.h | 3 +++ ivi-shell/ivi-layout.c | 10 ++++++++++ ivi-shell/ivi-shell.c | 2 ++ 3 files changed, 15 insertions(+) diff --git a/ivi-shell/ivi-layout-shell.h b/ivi-shell/ivi-layout-shell.h index bbbb77da..63f66fa9 100644 --- a/ivi-shell/ivi-layout-shell.h +++ b/ivi-shell/ivi-layout-shell.h @@ -57,6 +57,9 @@ ivi_layout_surface_create(struct weston_surface *wl_surface, void ivi_layout_init_with_compositor(struct weston_compositor *ec); +void +ivi_layout_fini(void); + void ivi_layout_surface_destroy(struct ivi_layout_surface *ivisurf); diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c index b2f8323b..0f0f4f8a 100644 --- a/ivi-shell/ivi-layout.c +++ b/ivi-shell/ivi-layout.c @@ -2053,6 +2053,16 @@ ivi_layout_init_with_compositor(struct weston_compositor *ec) sizeof(struct ivi_layout_interface)); } +void +ivi_layout_fini(void) +{ + struct ivi_layout *layout = get_instance(); + + weston_layer_fini(&layout->layout_layer); + + /* XXX: tear down everything else */ +} + static struct ivi_layout_interface ivi_layout_interface = { /** * commit all changes diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c index 811a83eb..4ab39595 100644 --- a/ivi-shell/ivi-shell.c +++ b/ivi-shell/ivi-shell.c @@ -353,6 +353,8 @@ shell_destroy(struct wl_listener *listener, void *data) free(ivisurf); } + ivi_layout_fini(); + free(shell); }