summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2020-06-08 21:11:12 +0300
committerMarius Vlad <marius.vlad@collabora.com>2020-06-15 20:18:52 +0300
commit9701fd67de31e7f6bd5aa36a98577ccc5ad42f44 (patch)
tree7442b6895f179b66dc5f46effae8907f47bb2802
parentc8d025cdb9b3a60f86ebe79065f848ebb3d45d3e (diff)
shell: Advertise application_id event for other surface roles
application_id event is sent just when a client binds to the agl_desktop_shell interface and when new desktop role surface were created, skipping split, fullscreen and pop-up kind of surface. This patch sends the application_id event for those as well. Makes SPEC-3412 much easier to determine when the application itself was started. Bug-AGL: SPEC-3412 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ic5c0ebf130fda45c5fda89e0e27e81dea96195cd
-rw-r--r--src/shell.c28
1 files changed, 21 insertions, 7 deletions
diff --git a/src/shell.c b/src/shell.c
index ac41e1f..f969503 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -45,15 +45,11 @@
static void
create_black_surface_view(struct ivi_output *output);
-void
-ivi_set_desktop_surface(struct ivi_surface *surface)
+static void
+agl_shell_desktop_advertise_application_id(struct ivi_compositor *ivi,
+ struct ivi_surface *surface)
{
struct desktop_client *dclient;
- struct ivi_compositor *ivi = surface->ivi;
- assert(surface->role == IVI_SURFACE_ROLE_NONE);
-
- surface->role = IVI_SURFACE_ROLE_DESKTOP;
- wl_list_insert(&surface->ivi->surfaces, &surface->link);
/* advertise to all desktop clients the new surface */
wl_list_for_each(dclient, &ivi->desktop_clients, link) {
@@ -63,6 +59,18 @@ ivi_set_desktop_surface(struct ivi_surface *surface)
}
}
+void
+ivi_set_desktop_surface(struct ivi_surface *surface)
+{
+ struct ivi_compositor *ivi = surface->ivi;
+ assert(surface->role == IVI_SURFACE_ROLE_NONE);
+
+ surface->role = IVI_SURFACE_ROLE_DESKTOP;
+ 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)
{
@@ -71,6 +79,8 @@ ivi_set_desktop_surface_popup(struct ivi_surface *surface)
surface->role = IVI_SURFACE_ROLE_POPUP;
wl_list_insert(&ivi->surfaces, &surface->link);
+
+ agl_shell_desktop_advertise_application_id(ivi, surface);
}
static void
@@ -81,6 +91,8 @@ ivi_set_desktop_surface_fullscreen(struct ivi_surface *surface)
surface->role = IVI_SURFACE_ROLE_FULLSCREEN;
wl_list_insert(&ivi->surfaces, &surface->link);
+
+ agl_shell_desktop_advertise_application_id(ivi, surface);
}
static void
@@ -119,6 +131,8 @@ ivi_set_desktop_surface_split(struct ivi_surface *surface)
surface->role = IVI_SURFACE_ROLE_SPLIT_H;
wl_list_insert(&ivi->surfaces, &surface->link);
+
+ agl_shell_desktop_advertise_application_id(ivi, surface);
}
static void