X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fdesktop.c;h=efebfc167dbaf1c231b04358871fa378c934b103;hb=7ecc8c2ee8a776bb1d57df22cb74493633c6f6e1;hp=ac68b784c15b1bf011b8241a71a572574cb90f28;hpb=52df92d73985dba862a157c5ca3003cbe465e295;p=src%2Fagl-compositor.git diff --git a/src/desktop.c b/src/desktop.c index ac68b78..efebfc1 100644 --- a/src/desktop.c +++ b/src/desktop.c @@ -134,7 +134,7 @@ desktop_surface_added(struct weston_desktop_surface *dsurface, void *userdata) surface->ivi = ivi; surface->dsurface = dsurface; surface->role = IVI_SURFACE_ROLE_NONE; - surface->activated_by_default = false; + surface->mapped = false; surface->advertised_on_launch = false; surface->checked_pending = false; wl_list_init(&surface->link); @@ -436,6 +436,17 @@ static const struct weston_desktop_api desktop_api = { .set_xwayland_position = desktop_set_xwayland_position, }; +static void +ivi_shell_destroy(struct wl_listener *listener, void *data) +{ + struct ivi_compositor *ivi = container_of(listener, + struct ivi_compositor, destroy_listener); + + weston_desktop_destroy(ivi->desktop); + ivi_compositor_destroy_pending_surfaces(ivi); + wl_list_remove(&listener->link); +} + int ivi_desktop_init(struct ivi_compositor *ivi) { @@ -445,5 +456,10 @@ ivi_desktop_init(struct ivi_compositor *ivi) return -1; } + if (!weston_compositor_add_destroy_listener_once(ivi->compositor, + &ivi->destroy_listener, ivi_shell_destroy)) { + return -1; + } + return 0; }