X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fdesktop.c;h=f28d0c9dc9f0e3289b8892009a57f582ee2a6555;hb=0512e7251611e7040c55;hp=37f42223c7ebfb519a1ba048e81ed89d65896866;hpb=b92397ef12626a0d09cb4c9e853d0c038104110f;p=src%2Fagl-compositor.git diff --git a/src/desktop.c b/src/desktop.c index 37f4222..f28d0c9 100644 --- a/src/desktop.c +++ b/src/desktop.c @@ -366,10 +366,15 @@ skip_output_asignment: weston_log("Removed surface %p, app_id %s, role %s\n", surface, app_id, ivi_layout_get_surface_role_name(surface)); - if (app_id && output) + if (app_id && output) { shell_advertise_app_state(output->ivi, app_id, NULL, AGL_SHELL_DESKTOP_APP_STATE_DESTROYED); + if (wl_resource_get_version(output->ivi->shell_client.resource) >= AGL_SHELL_APP_STATE_SINCE_VERSION) + agl_shell_send_app_state(output->ivi->shell_client.resource, + app_id, AGL_SHELL_APP_STATE_TERMINATED); + } + wl_list_remove(&surface->link); free(surface); @@ -396,6 +401,13 @@ desktop_committed(struct weston_desktop_surface *dsurface, wl_list_init(&surface->link); ivi_check_pending_desktop_surface(surface); surface->checked_pending = true; + + /* we'll do it now at commit time, because we might not have an + * appid by the time we've created the weston_desktop_surface + * */ + if (wl_resource_get_version(ivi->shell_client.resource) >= AGL_SHELL_APP_STATE_SINCE_VERSION) + agl_shell_send_app_state(ivi->shell_client.resource, + app_id, AGL_SHELL_APP_STATE_STARTED); } if (!surface->advertised_on_launch &&