From 50827ed7f5f01ed2f03f67c5e9e55e13ede06748 Mon Sep 17 00:00:00 2001 From: Kirill Primak Date: Thu, 13 Jan 2022 14:08:54 +0300 Subject: surface: improve role precommit hook Now the role precommit hook is called before the commit, not on wl_surface.commit request, and takes a state which is to be applied. --- include/wlr/types/wlr_compositor.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_compositor.h b/include/wlr/types/wlr_compositor.h index 0146a8ab..071610b8 100644 --- a/include/wlr/types/wlr_compositor.h +++ b/include/wlr/types/wlr_compositor.h @@ -73,7 +73,8 @@ struct wlr_surface_state { struct wlr_surface_role { const char *name; void (*commit)(struct wlr_surface *surface); - void (*precommit)(struct wlr_surface *surface); + void (*precommit)(struct wlr_surface *surface, + const struct wlr_surface_state *state); }; struct wlr_surface_output { -- cgit v1.2.3