diff options
author | Simon Ser <contact@emersion.fr> | 2023-06-23 14:23:27 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-06-23 14:23:27 +0200 |
commit | 89cb4842208a2997cfa3a9bef7ac66e01a414ebb (patch) | |
tree | 677299cb6d84a93565a8878200752ff1715d0fb2 /include | |
parent | 00f1870d3566041e2e1ef2502dc52140f23bc556 (diff) |
compositor: replace role_data with role_resource
This increases type safety, makes it more obvious that role_data
must represent the role object, and will allow for automatic
cleanup when the resource is destroyed.
Diffstat (limited to 'include')
-rw-r--r-- | include/wlr/types/wlr_compositor.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/wlr/types/wlr_compositor.h b/include/wlr/types/wlr_compositor.h index ba2d4649..40ea7e9f 100644 --- a/include/wlr/types/wlr_compositor.h +++ b/include/wlr/types/wlr_compositor.h @@ -167,7 +167,7 @@ struct wlr_surface { * The role object representing the role. NULL if the role isn't * represented by any object or the object was destroyed. */ - void *role_data; + struct wl_resource *role_resource; struct { struct wl_signal client_commit; @@ -247,7 +247,7 @@ 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. */ -void wlr_surface_set_role_object(struct wlr_surface *surface, void *role_data); +void wlr_surface_set_role_object(struct wlr_surface *surface, struct wl_resource *role_resource); /** * Destroy the object representing the surface's role. If it doesn't exist, |