diff options
author | 2020-09-23 13:31:23 +0000 | |
---|---|---|
committer | 2020-10-15 09:33:47 +0000 | |
commit | fe771c084c2f0192ca08dd3b7f85088960703e36 (patch) | |
tree | ad8cb121acf994dc9bc8f61281a393641f8366ae /src/shell.c | |
parent | abe3abc327b7d770b81f976d79f12112010e6a4e (diff) |
shell: Advertise app when app_id is available
When using GTK-3 to create apps, the framework issues set_parent_id
which forces a surface to be added even before the app_id is set.
This causes the compositor to fail to advertise the app.
This patch tries to overcome this issue by checking on surface commit
if the surface was previously advertised, and do it if it was not.
Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
Change-Id: I4e5fec82c1008c30d8ae7d213d85a82e39c404c3
Diffstat (limited to 'src/shell.c')
-rw-r--r-- | src/shell.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/shell.c b/src/shell.c index 94fdb66..e6fb332 100644 --- a/src/shell.c +++ b/src/shell.c @@ -45,12 +45,15 @@ static void create_black_surface_view(struct ivi_output *output); -static void +void agl_shell_desktop_advertise_application_id(struct ivi_compositor *ivi, struct ivi_surface *surface) { struct desktop_client *dclient; + if (surface->advertised_on_launch) + return; + /* advertise to all desktop clients the new surface */ wl_list_for_each(dclient, &ivi->desktop_clients, link) { const char *app_id = @@ -60,6 +63,7 @@ agl_shell_desktop_advertise_application_id(struct ivi_compositor *ivi, return; } agl_shell_desktop_send_application(dclient->resource, app_id); + surface->advertised_on_launch = true; } } |