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