wayland-server: Add wl_client_add_destroy_late_listener

A late-destroy listener for a client is called after all the client's
resources have been destroyed and the destroy callbacks emitted. This
lives in parallel to the existing client destroy listener, called
immediately before the client's objects get destroyed.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Fixes: wayland/wayland#207
This commit is contained in:
Daniel Stone 2022-07-21 11:07:04 +01:00
parent e886b456ab
commit 51d788de5b
3 changed files with 74 additions and 0 deletions

View file

@ -330,6 +330,14 @@ struct wl_listener *
wl_client_get_destroy_listener(struct wl_client *client,
wl_notify_func_t notify);
void
wl_client_add_destroy_late_listener(struct wl_client *client,
struct wl_listener *listener);
struct wl_listener *
wl_client_get_destroy_late_listener(struct wl_client *client,
wl_notify_func_t notify);
struct wl_resource *
wl_client_get_object(struct wl_client *client, uint32_t id);