From 7033e74857a01cd8fc07cd2e6336d8bfe43cbed5 Mon Sep 17 00:00:00 2001 From: Julian Orth Date: Wed, 12 Mar 2025 21:13:40 +0100 Subject: [PATCH] client: document get_listener behavior for dispatchers This seems to have been the case since 2013. This is useful for wrappers that need two pointers to identify proxies. One pointer (stored in the user data) pointing to a singleton object to identify that the proxy has a known structure. And one pointer (stored in the dispatcher data) pointing to per-proxy data. Signed-off-by: Julian Orth --- src/wayland-client.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wayland-client.c b/src/wayland-client.c index 8df160b4..3d0ef7b4 100644 --- a/src/wayland-client.c +++ b/src/wayland-client.c @@ -674,6 +674,9 @@ wl_proxy_add_listener(struct wl_proxy *proxy, * This function is useful in clients with multiple listeners on the same * interface to allow the identification of which code to execute. * + * If \ref wl_proxy_add_dispatcher was used, this function returns the + * dispatcher_data pointer instead. + * * \memberof wl_proxy */ WL_EXPORT const void *