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.
This commit is contained in:
Kirill Primak 2021-10-04 21:41:34 +03:00
parent b7de136e8d
commit 4b9014b3f7
7 changed files with 20 additions and 18 deletions

View file

@ -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,
struct wlr_surface_state *state);
};
struct wlr_surface_output {