aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-11-17 00:34:19 +0100
committerDrew DeVault <sir@cmpwn.com>2019-11-21 11:03:43 -0500
commit2d9661f189c5e89dcd1b4b5a289dc9229cf8ab5a (patch)
treeb4473e4f7721145ada8ffc9554a0af9b5733467e
parentd0479cc2bc0337b5d9458647bf4e2dad218c5cff (diff)
output: set wlr_output.commit_seq before firing the commit event
This allows listeners to read the commit sequence number.
-rw-r--r--types/wlr_output.c3
1 files changed, 2 insertions, 1 deletions
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;
}