From 766c7e20dc8e0b637c392ff9b5dfef8ce2b25cc4 Mon Sep 17 00:00:00 2001 From: Wataru Natsume Date: Thu, 25 Feb 2016 16:18:30 +0900 Subject: ivi-controller: Send process ID that created surface to client. createPid should be a pid of process that creates surface. Signed-off-by: Wataru Natsume --- weston-ivi-shell/src/ivi-controller-impl.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/weston-ivi-shell/src/ivi-controller-impl.c b/weston-ivi-shell/src/ivi-controller-impl.c index c16276f..abf1c85 100644 --- a/weston-ivi-shell/src/ivi-controller-impl.c +++ b/weston-ivi-shell/src/ivi-controller-impl.c @@ -610,10 +610,18 @@ controller_surface_send_stats(struct wl_client *client, struct wl_resource *resource) { struct ivisurface *ivisurf = wl_resource_get_user_data(resource); + struct weston_surface *surface; + struct wl_client* target_client; pid_t pid; uid_t uid; gid_t gid; - wl_client_get_credentials(client, &pid, &uid, &gid); + + /* Get pid that creates surface */ + surface = ivi_extension_surface_get_weston_surface(ivisurf->shell, + ivisurf->layout_surface); + target_client = wl_resource_get_client(surface->resource); + + wl_client_get_credentials(target_client, &pid, &uid, &gid); ivi_controller_surface_send_stats(resource, 0, 0, ivisurf->update_count, pid, ""); -- cgit v1.2.1