From 8a5b5e6f28dae650df36a271213655b8bdf52dbf Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 23 Jun 2023 14:33:26 +0200 Subject: compositor: listen to role_resource destroy signal Call wlr_surface_destroy_role_object() when the role_resource is destroyed. --- include/wlr/types/wlr_compositor.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/wlr/types/wlr_compositor.h b/include/wlr/types/wlr_compositor.h index 40ea7e9f..ffb56896 100644 --- a/include/wlr/types/wlr_compositor.h +++ b/include/wlr/types/wlr_compositor.h @@ -199,6 +199,7 @@ struct wlr_surface { // private state struct wl_listener renderer_destroy; + struct wl_listener role_resource_destroy; struct { int32_t scale; @@ -246,6 +247,8 @@ bool wlr_surface_set_role(struct wlr_surface *surface, const struct wlr_surface_ /** * Set the role object for this surface. The surface must have a role and * no already set role object. + * + * wlr_surface_destroy_role_object() is called when the resource is destroyed. */ void wlr_surface_set_role_object(struct wlr_surface *surface, struct wl_resource *role_resource); -- cgit v1.2.3