X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fshell.c;h=687094a23959915a8cfc4463509cd414dbdac3f5;hb=831d1b21b5e786d2e5e804ca5a6a2a2b1dfacd1e;hp=c132ae528f28c7fb45caeb78f0ee28ae11bcb0c8;hpb=edbfbad7344c4de62cbf5a4a5c8935afa50d8b4a;p=src%2Fagl-compositor.git diff --git a/src/shell.c b/src/shell.c index c132ae5..687094a 100644 --- a/src/shell.c +++ b/src/shell.c @@ -140,14 +140,22 @@ ivi_set_pending_desktop_surface_split(struct ivi_output *ioutput, const char *app_id, uint32_t orientation) { struct ivi_compositor *ivi = ioutput->ivi; + struct ivi_surface *surf; size_t len_app_id = strlen(app_id); + struct pending_split *split; if (orientation != AGL_SHELL_DESKTOP_APP_ROLE_SPLIT_VERTICAL && orientation != AGL_SHELL_DESKTOP_APP_ROLE_SPLIT_HORIZONTAL) return; - struct pending_split *split = zalloc(sizeof(*split)); + /* more than one is un-supported, do note we need to do + * conversion for surface roles instead of using the protocol ones */ + wl_list_for_each(surf, &ivi->surfaces, link) + if (surf->role == IVI_SURFACE_ROLE_SPLIT_V || + surf->role == IVI_SURFACE_ROLE_SPLIT_H) + return; + split = zalloc(sizeof(*split)); split->app_id = zalloc(sizeof(char) * (len_app_id + 1)); memcpy(split->app_id, app_id, len_app_id); @@ -276,8 +284,10 @@ ivi_check_pending_desktop_surface(struct ivi_surface *surface) return; } - /* if we end up here means we have a regular desktop app */ + /* if we end up here means we have a regular desktop app and + * try to activate it */ ivi_set_desktop_surface(surface); + ivi_layout_desktop_committed(surface); } void @@ -525,13 +535,7 @@ shell_ready(struct wl_client *client, struct wl_resource *shell_res) wl_list_for_each_safe(surface, tmp, &ivi->pending_surfaces, link) { wl_list_remove(&surface->link); - - if (ivi_check_pending_desktop_surface_popup(surface)) { - ivi_set_desktop_surface_popup(surface); - } else { - ivi_set_desktop_surface(surface); - ivi_layout_desktop_committed(surface); - } + ivi_check_pending_desktop_surface(surface); } }