aboutsummaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
authorKirill Primak <vyivel@eclair.cafe>2022-01-13 14:08:54 +0300
committerKirill Primak <vyivel@eclair.cafe>2022-01-13 15:15:54 +0300
commit50827ed7f5f01ed2f03f67c5e9e55e13ede06748 (patch)
treeafc79225ee3099bf3d40833f3201114981ff52f9 /xwayland
parent617eb4fb9338c6960feb95b1a734c9cdd6bc5c46 (diff)
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.
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/xwm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c
index f0a010d9..0c199269 100644
--- a/xwayland/xwm.c
+++ b/xwayland/xwm.c
@@ -852,15 +852,15 @@ static void xwayland_surface_role_commit(struct wlr_surface *wlr_surface) {
}
}
-static void xwayland_surface_role_precommit(struct wlr_surface *wlr_surface) {
+static void xwayland_surface_role_precommit(struct wlr_surface *wlr_surface,
+ const struct wlr_surface_state *state) {
assert(wlr_surface->role == &xwayland_surface_role);
struct wlr_xwayland_surface *surface = wlr_surface->role_data;
if (surface == NULL) {
return;
}
- if (wlr_surface->pending.committed & WLR_SURFACE_STATE_BUFFER &&
- wlr_surface->pending.buffer == NULL) {
+ if (state->committed & WLR_SURFACE_STATE_BUFFER && state->buffer == NULL) {
// This is a NULL commit
if (surface->mapped) {
wlr_signal_emit_safe(&surface->events.unmap, surface);