diff options
author | 2020-05-29 21:46:53 +0300 | |
---|---|---|
committer | 2020-06-08 23:18:40 +0300 | |
commit | c6aa9f35144e80332e2ad3c723124b7711a0bf58 (patch) | |
tree | e9cdaa71afdb17d8e2d7467a3679c88b265621a6 /src/shell.c | |
parent | 9cf6c3f183f56f47f9a32b747dd70dfde235cc49 (diff) |
src: Insert a black surface/remove it when the last remote
surface role is present
Bug-AGL: SPEC-3280
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ia47c0539ff26d1378bb9ac75e19592d7b8b2b3bf
Diffstat (limited to 'src/shell.c')
-rw-r--r-- | src/shell.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/shell.c b/src/shell.c index 37ceb25..e1aac8d 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; |