diff options
author | Wataru Natsume <wnatsume@jp.adit-jv.com> | 2016-02-25 16:18:30 +0900 |
---|---|---|
committer | Wataru Natsume <wataru_natsume@xddp.denso.co.jp> | 2016-03-21 12:34:57 +0900 |
commit | 766c7e20dc8e0b637c392ff9b5dfef8ce2b25cc4 (patch) | |
tree | 140119d9072aa83dff7f1350eaf9679ebe49ed66 | |
parent | 796929bf117af635d986ce72381ae9f56c6ab5d1 (diff) | |
download | wayland-ivi-extension-766c7e20dc8e0b637c392ff9b5dfef8ce2b25cc4.tar.gz |
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 <wnatsume@jp.adit-jv.com>
-rw-r--r-- | weston-ivi-shell/src/ivi-controller-impl.c | 10 |
1 files changed, 9 insertions, 1 deletions
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, ""); |