From: Marius Vlad Date: Mon, 6 Apr 2020 19:42:51 +0000 (+0300) Subject: shell: Store the ivi compositor in the desktop_client X-Git-Tag: 9.99.1~57 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=ef3d1990c498e6d9b1a24531b751688cac287d28;p=src%2Fagl-compositor.git shell: Store the ivi compositor in the desktop_client Allows to retrieve the ivi compositor without passing addtional resource in the request. Bug-AGL: SPEC-3269 Signed-off-by: Marius Vlad Change-Id: I515e8133a8bdc6400932d3c08a112982546c3ff9 --- diff --git a/src/ivi-compositor.h b/src/ivi-compositor.h index 75c5568..bdd91ff 100644 --- a/src/ivi-compositor.h +++ b/src/ivi-compositor.h @@ -36,8 +36,11 @@ #include "agl-shell-server-protocol.h" +struct ivi_compositor; + struct desktop_client { struct wl_resource *resource; + struct ivi_compositor *ivi; struct wl_list link; /* ivi_compositor::desktop_clients */ }; diff --git a/src/shell.c b/src/shell.c index a9be929..cf1214a 100644 --- a/src/shell.c +++ b/src/shell.c @@ -660,6 +660,7 @@ bind_agl_shell_desktop(struct wl_client *client, resource = wl_resource_create(client, &agl_shell_desktop_interface, version, id); + dclient->ivi = ivi; if (!resource) { wl_client_post_no_memory(client); return;