X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Flayout.c;h=4b8a6914d31fcff7c5ad173578856b60fa01efb3;hb=699bdf5e69517f2e7d7238377b41121b1470af3f;hp=5576094e8e761bde077f061d3a6bbc8c3017967a;hpb=26700fa20abefccb77bb586b49b1629bf102e131;p=src%2Fagl-compositor.git diff --git a/src/layout.c b/src/layout.c index 5576094..4b8a691 100644 --- a/src/layout.c +++ b/src/layout.c @@ -325,7 +325,7 @@ ivi_layout_activate_complete(struct ivi_output *output, * we're trying to complete activation with means we're * operating on the same app_id so do update previous_active as * it will overwrite it with the same value */ - if (!strcmp(c_app_id, app_id)) { + if (app_id && !strcmp(c_app_id, app_id)) { update_previous = false; } } @@ -730,6 +730,7 @@ ivi_layout_fullscreen_committed(struct ivi_surface *surface) ivi_layout_get_surface_role_name(surface), output->name); + weston_compositor_schedule_repaint(ivi->compositor); } } @@ -974,6 +975,32 @@ ivi_layout_popup_re_add(struct ivi_surface *surface) ivi_layout_popup_committed(surface); } +static void +ivi_layout_fullscreen_re_add(struct ivi_surface *surface) +{ + assert(surface->role == IVI_SURFACE_ROLE_FULLSCREEN); + struct weston_view *view = surface->view; + + if (weston_view_is_mapped(view)) { + struct weston_desktop_surface *dsurface = surface->dsurface; + struct weston_surface *wsurface = + weston_desktop_surface_get_surface(dsurface); + + weston_layer_entry_remove(&view->layer_link); + + wsurface->is_mapped = false; + view->is_mapped = false; + } + + /* reset the activate by default in order to (still) allow the surface + * to be activaved using the request */ + if (!surface->mapped) + surface->mapped = true; + + surface->state = NORMAL; + ivi_layout_fullscreen_committed(surface); +} + static bool ivi_layout_surface_is_split_or_fullscreen(struct ivi_surface *surf) { @@ -1027,6 +1054,11 @@ ivi_layout_activate_by_surf(struct ivi_output *output, struct ivi_surface *surf) return; } + if (surf->role == IVI_SURFACE_ROLE_FULLSCREEN) { + ivi_layout_fullscreen_re_add(surf); + return; + } + /* do not 're'-activate surfaces that are split or active */ if (surf == output->active || ivi_layout_surface_is_split_or_fullscreen(surf)) { @@ -1177,7 +1209,8 @@ ivi_layout_deactivate(struct ivi_compositor *ivi, const char *app_id) weston_desktop_surface_get_app_id(dsurface); ivi_layout_activate(ivi_output, previous_active_app_id); } - } else if (surf->role == IVI_SURFACE_ROLE_POPUP) { + } else if (surf->role == IVI_SURFACE_ROLE_POPUP || + surf->role == IVI_SURFACE_ROLE_FULLSCREEN) { struct weston_view *view = surf->view; weston_view_unmap(view); @@ -1188,5 +1221,5 @@ ivi_layout_deactivate(struct ivi_compositor *ivi, const char *app_id) weston_surface_damage(view->surface); } - shell_send_app_state(ivi, app_id, AGL_SHELL_APP_STATE_DEACTIVATED); + shell_send_app_state(ivi, app_id, AGL_SHELL_APP_STATE_DEACTIVATED); }