summaryrefslogtreecommitdiffstats
path: root/src/shell.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/shell.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/shell.c')
-rw-r--r--src/shell.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/shell.c b/src/shell.c
index 032e114..cefd157 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -92,6 +92,16 @@ ivi_set_desktop_surface(struct ivi_surface *surface)
}
static void
+ivi_set_background_surface(struct ivi_surface *surface)
+{
+ struct ivi_compositor *ivi = surface->ivi;
+ assert(surface->role == IVI_SURFACE_ROLE_BACKGROUND);
+
+ wl_list_insert(&surface->ivi->surfaces, &surface->link);
+ agl_shell_desktop_advertise_application_id(ivi, surface);
+}
+
+static void
ivi_set_desktop_surface_popup(struct ivi_surface *surface)
{
struct ivi_compositor *ivi = surface->ivi;
@@ -1164,8 +1174,14 @@ shell_ready(struct wl_client *client, struct wl_resource *shell_res)
ivi->shell_client.ready = true;
wl_list_for_each(output, &ivi->outputs, link) {
- if (output->background)
+ if (output->background &&
+ output->background->role == IVI_SURFACE_ROLE_BACKGROUND) {
+ /* track the background surface role as a "regular"
+ * surface so we can activate it */
+ ivi_set_background_surface(output->background);
remove_black_curtain(output);
+ }
+
ivi_layout_init(ivi, output);
}