From 7e1ae5548c69e1cee02c6ae12e7939a155ecb64e Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Sun, 10 Dec 2023 15:32:23 +0100 Subject: compositor: add wlr_surface_role.client_commit --- include/wlr/types/wlr_compositor.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/wlr/types/wlr_compositor.h b/include/wlr/types/wlr_compositor.h index 94262b4b..da12427e 100644 --- a/include/wlr/types/wlr_compositor.h +++ b/include/wlr/types/wlr_compositor.h @@ -81,6 +81,15 @@ struct wlr_surface_role { * For example, this applies to cursor surfaces. */ bool no_object; + /** + * Called when the client sends the wl_surface.commit request. May be NULL. + * Typically used to check that the pending state is valid, and send + * protocol errors if not. + * + * If the role is represented by an object, this is only called if + * such object exists. + */ + void (*client_commit)(struct wlr_surface *surface); /** * Called when a new surface state is committed. May be NULL. * -- cgit v1.2.3