From 2d9661f189c5e89dcd1b4b5a289dc9229cf8ab5a Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Sun, 17 Nov 2019 00:34:19 +0100 Subject: [PATCH] output: set wlr_output.commit_seq before firing the commit event This allows listeners to read the commit sequence number. --- types/wlr_output.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/wlr_output.c b/types/wlr_output.c index 793907dd..3e397532 100644 --- a/types/wlr_output.c +++ b/types/wlr_output.c @@ -495,13 +495,14 @@ bool wlr_output_commit(struct wlr_output *output) { wlr_surface_send_frame_done(cursor->surface, &now); } + output->commit_seq++; + wlr_signal_emit_safe(&output->events.commit, output); output->frame_pending = true; output->needs_frame = false; output_state_clear(&output->pending); pixman_region32_clear(&output->damage); - output->commit_seq++; return true; }