From 756260ac0580be4cb760b97fa6853fca983ac3c3 Mon Sep 17 00:00:00 2001 From: Kirill Primak Date: Wed, 2 Nov 2022 23:44:30 +0300 Subject: compositor: introduce wlr_surface_destroy_role_object() --- include/wlr/types/wlr_compositor.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/wlr/types/wlr_compositor.h b/include/wlr/types/wlr_compositor.h index 50a401ba..f3da622b 100644 --- a/include/wlr/types/wlr_compositor.h +++ b/include/wlr/types/wlr_compositor.h @@ -76,6 +76,7 @@ struct wlr_surface_role { void (*commit)(struct wlr_surface *surface); void (*precommit)(struct wlr_surface *surface, const struct wlr_surface_state *state); + void (*destroy)(struct wlr_surface *surface); }; struct wlr_surface_output { @@ -189,8 +190,13 @@ typedef void (*wlr_surface_iterator_func_t)(struct wlr_surface *surface, * the role cannot be set. */ bool wlr_surface_set_role(struct wlr_surface *surface, - const struct wlr_surface_role *role, void *role_data, - struct wl_resource *error_resource, uint32_t error_code); + const struct wlr_surface_role *role, void *role_data, + struct wl_resource *error_resource, uint32_t error_code); + +/** + * Destroy the role object for this surface. This doesn't reset the role. + */ +void wlr_surface_destroy_role_object(struct wlr_surface *surface); /** * Whether or not this surface currently has an attached buffer. A surface has -- cgit v1.2.3