shell: Store the ivi compositor in the desktop_client 99/24399/2
authorMarius Vlad <marius.vlad@collabora.com>
Mon, 6 Apr 2020 19:42:51 +0000 (22:42 +0300)
committerMarius Vlad <marius.vlad@collabora.com>
Tue, 12 May 2020 18:30:29 +0000 (18:30 +0000)
Allows to retrieve the ivi compositor without passing addtional resource
in the request.

Bug-AGL: SPEC-3269

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I515e8133a8bdc6400932d3c08a112982546c3ff9

src/ivi-compositor.h
src/shell.c

index 75c5568..bdd91ff 100644 (file)
 
 #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 */
 };
 
index a9be929..cf1214a 100644 (file)
@@ -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;