X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fshell.c;h=6944f8a254543e1e17c69ee56745060e4dbf9143;hb=refs%2Fchanges%2F65%2F24665%2F1;hp=37ceb259f192b0f8143ebbbd5799f93941e0bd10;hpb=d95b25c6a9dfa6ef7b8d6dfa05c8a2594c045e52;p=src%2Fagl-compositor.git diff --git a/src/shell.c b/src/shell.c index 37ceb25..6944f8a 100644 --- a/src/shell.c +++ b/src/shell.c @@ -45,9 +45,6 @@ static void create_black_surface_view(struct ivi_output *output); -static void -insert_black_surface(struct ivi_output *output); - void ivi_set_desktop_surface(struct ivi_surface *surface) { @@ -90,11 +87,22 @@ static void ivi_set_desktop_surface_remote(struct ivi_surface *surface) { struct ivi_compositor *ivi = surface->ivi; + struct weston_view *view; + struct ivi_output *output = surface->remote.output; + assert(surface->role == IVI_SURFACE_ROLE_NONE); /* remote type are the same as desktop just that client can tell * the compositor to start on another output */ surface->role = IVI_SURFACE_ROLE_REMOTE; + + /* if thew black surface view is mapped on the mean we need + * to remove it in order to start showing the 'remote' surface + * just being added */ + view = output->fullscreen_view.fs->view; + if (view->is_mapped || view->surface->is_mapped) + remove_black_surface(output); + wl_list_insert(&ivi->surfaces, &surface->link); } @@ -548,7 +556,7 @@ create_black_surface_view(struct ivi_output *output) &output->fullscreen_view.fs_destroy); } -static void +void remove_black_surface(struct ivi_output *output) { struct weston_view *view = output->fullscreen_view.fs->view; @@ -565,7 +573,7 @@ remove_black_surface(struct ivi_output *output) weston_output_damage(output->output); } -static void +void insert_black_surface(struct ivi_output *output) { struct weston_view *view = output->fullscreen_view.fs->view; @@ -598,7 +606,8 @@ shell_ready(struct wl_client *client, struct wl_resource *shell_res) ivi->shell_client.ready = true; wl_list_for_each(output, &ivi->outputs, link) { - remove_black_surface(output); + if (output->background) + remove_black_surface(output); ivi_layout_init(ivi, output); }