1 From f4adf64d979944aa80f1ba5dba4ed991b6620162 Mon Sep 17 00:00:00 2001
2 From: Wataru Natsume <wnatsume@jp.adit-jv.com>
3 Date: Tue, 23 Feb 2016 11:14:53 +0900
4 Subject: [PATCH] ivi-controller: Send process ID that created surface to
7 createPid should be a pid of process that creates surface.
9 Signed-off-by: Wataru Natsume <wnatsume@jp.adit-jv.com>
11 weston-ivi-shell/src/ivi-controller-impl.c | 13 ++++++++++++-
12 1 file changed, 12 insertions(+), 1 deletion(-)
14 diff --git a/weston-ivi-shell/src/ivi-controller-impl.c b/weston-ivi-shell/src/ivi-controller-impl.c
15 index f4e29ce..57bf5cc 100644
16 --- a/weston-ivi-shell/src/ivi-controller-impl.c
17 +++ b/weston-ivi-shell/src/ivi-controller-impl.c
18 @@ -603,10 +603,21 @@ controller_surface_send_stats(struct wl_client *client,
19 struct wl_resource *resource)
21 struct ivisurface *ivisurf = wl_resource_get_user_data(resource);
22 + struct weston_surface *surface;
23 + struct wl_client* target_client;
27 - wl_client_get_credentials(client, &pid, &uid, &gid);
29 + /* Get pid that created surface */
30 + surface = ivi_extension_surface_get_weston_surface(ivisurf->shell,
31 + ivisurf->layout_surface);
35 + target_client = wl_resource_get_client(surface->resource);
37 + wl_client_get_credentials(target_client, &pid, &uid, &gid);
39 ivi_controller_surface_send_stats(resource, 0, 0,
40 ivisurf->update_count, pid, "");