Regarding user data for wl_client.

박성진 sj76.park at
Wed Jan 27 02:45:04 PST 2016

Dear all and nicesj,
I push a patch to add get/set user data for wl_client.
If it does make sense, I think it'll be merged into the repository after getting reviewed.

Thanks and regards, 
Sung-Jin Park

------- Original Message -------
Sender : Giulio Camuffo<giuliocamuffo at> 
Date   : 2016-01-27 19:14 (GMT+09:00)
Title  : Re: Regarding user data for wl_client.

2016-01-27 5:30 GMT+02:00  <nicesj at>:
> Dear all,
> Currently, I'm writing a simple compositor for proving my thought.
> while implementing it, I found that the wl_client doesn't have the user data
> field.
> in the sever side, the wl_client is used in many callbacks for handling the
> request of clients.
> are there any functions like wl_client_set_user_data, get_user_data?

As Pekka said they are missing as of now, however there is a workaround: have a

struct my_client {
  wl_listener destroy_listener;

and set the listener on the wl_client with
&my_client.destroy_listener), you can then retrieve the my_client from
the wl_client by doing

struct wl_listener *l = wl_client_get_destroy_listener(wl_client, ...);
struct my_client *c = container_of(l, struct my_client, destroy_listener);


> Best regards,
> Sungjae Park
> Sent from my android device.
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at
wayland-devel mailing list
wayland-devel at
<p> </p><p> </p>

More information about the wayland-devel mailing list