summaryrefslogtreecommitdiffstats
path: root/src/layout.c
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2022-11-14 16:28:28 +0200
committerMarius Vlad <marius.vlad@collabora.com>2022-11-14 18:35:00 +0200
commitadf173ea334eafd233d168815078c4d199b08619 (patch)
tree9c5048cde8d331f8f9fc564a421a493b63b8a417 /src/layout.c
parent77d94d831dfcdb4e173cd5253d94ec724d576e77 (diff)
layout: Allow background surface roles (to) be activated
While nothing technically prevents the background surface role to be activated, it turns out we don't actually track it so we a) couldn't find it, and b) we attempted to resize it to an incorrect dimension. Another small follow-up commit from 'Add manual activation area configuration option' and with with commit 'agl-shell: Add support for defining an activation area', which introduced the ability to designate a certain area as the activation area. v2: Keep the background surface always mapped We now have more than one active surfaces at the same time, so we can't unmap it as it needs to be always displayed. Bug-AGL: SPEC-4594 Reported-by: Scott Murray <scott.murray@konsulko.com> Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I2561ce2c4c1c96c796fb8ee1c8ca9a30772b71f9
Diffstat (limited to 'src/layout.c')
-rw-r--r--src/layout.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/layout.c b/src/layout.c
index 96eb215..1773fc8 100644
--- a/src/layout.c
+++ b/src/layout.c
@@ -248,9 +248,11 @@ ivi_layout_activate_complete(struct ivi_output *output,
weston_view_set_output(view, woutput);
- weston_view_set_position(view,
- woutput->x + output->area.x,
- woutput->y + output->area.y);
+
+ if (surf->role != IVI_SURFACE_ROLE_BACKGROUND)
+ weston_view_set_position(view,
+ woutput->x + output->area.x,
+ woutput->y + output->area.y);
view->is_mapped = true;
surf->mapped = true;
@@ -275,12 +277,14 @@ ivi_layout_activate_complete(struct ivi_output *output,
}
}
-
if (output->active) {
- output->active->view->is_mapped = false;
- output->active->view->surface->is_mapped = false;
+ /* keep the background surface mapped at all times */
+ if (output->active->role != IVI_SURFACE_ROLE_BACKGROUND) {
+ output->active->view->is_mapped = false;
+ output->active->view->surface->is_mapped = false;
- weston_layer_entry_remove(&output->active->view->layer_link);
+ weston_layer_entry_remove(&output->active->view->layer_link);
+ }
}
output->previous_active = output->active;
output->active = surf;
@@ -941,6 +945,13 @@ ivi_layout_activate_by_surf(struct ivi_output *output, struct ivi_surface *surf)
return;
}
+ /* the background surface is already "maximized" so we don't need to
+ * add to the hidden layer */
+ if (surf->role == IVI_SURFACE_ROLE_BACKGROUND) {
+ ivi_layout_activate_complete(output, surf);
+ return;
+ }
+
ivi_layout_add_to_hidden_layer(surf, output);
}