diff options
author | 2022-08-25 19:04:29 +0300 | |
---|---|---|
committer | 2022-09-14 19:39:44 +0300 | |
commit | b92397ef12626a0d09cb4c9e853d0c038104110f (patch) | |
tree | f6fec7f5482a711ee2fd47bc9906f0a0cc1070d6 /src/layout.c | |
parent | 372eb222b17bbc9d40357187aa9700eddcd21f50 (diff) |
shell: Remove the black curtain installed on outputs
Upon completion of activation we might have an output without
a background surface set-up on that particular output, so this patch
either uses the black curtain as a background surface (useful for
transparent applications, which need it) or we remove it entirely in case
the shell client has one installed.
The patch renames the black_surface to black_curtain to better reflect
its name. Also output filtering would need renaming
(desktop_surface_check_last_surfaces)
Bug-AGL: SPEC-4516
Reported-by: Vasyl Vavrychuk <vasyl.vavrychuk@opensynergy.com>
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I6071b07664772d891a4d8c33a7603573ec2069fa
Diffstat (limited to 'src/layout.c')
-rw-r--r-- | src/layout.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/layout.c b/src/layout.c index 03ac814..031923a 100644 --- a/src/layout.c +++ b/src/layout.c @@ -201,6 +201,28 @@ ivi_layout_activate_complete(struct ivi_output *output, weston_view_update_transform(view); } + if (output_has_black_curtain(output)) { + if (!output->background) { + weston_log("Found that we have no background surface " + "for output %s. Using black curtain as background\n", + output->output->name); + + struct weston_view *ev = + output->fullscreen_view.fs->view; + + /* use the black curtain as background when we have + * none added by the shell client. */ + weston_layer_entry_remove(&ev->layer_link); + weston_layer_entry_insert(&ivi->normal.view_list, + &ev->layer_link); + weston_view_geometry_dirty(ev); + weston_surface_damage(ev->surface); + } else { + remove_black_curtain(output); + } + } + + weston_view_set_output(view, woutput); weston_view_set_position(view, woutput->x + output->area.x, @@ -218,6 +240,7 @@ ivi_layout_activate_complete(struct ivi_output *output, } output->previous_active = output->active; output->active = surf; + surf->current_completed_output = output; weston_layer_entry_insert(&ivi->normal.view_list, &view->layer_link); weston_view_geometry_dirty(view); @@ -383,7 +406,7 @@ ivi_layout_desktop_committed(struct ivi_surface *surf) if (r_output) { struct weston_view *view = r_output->fullscreen_view.fs->view; if (view->is_mapped || view->surface->is_mapped) - remove_black_surface(r_output); + remove_black_curtain(r_output); } |