wlr_output: Add applied state to commit event

This commit is contained in:
Alexander Orzechowski 2023-08-24 18:03:19 -04:00 committed by Simon Ser
parent 0b15b4a6ae
commit 03e240a7f2
2 changed files with 2 additions and 0 deletions

View File

@ -227,6 +227,7 @@ struct wlr_output_event_commit {
uint32_t committed; // bitmask of enum wlr_output_state_field
struct timespec *when;
struct wlr_buffer *buffer; // NULL if no buffer is committed
const struct wlr_output_state *state;
};
enum wlr_output_present_flag {

View File

@ -836,6 +836,7 @@ bool wlr_output_commit_state(struct wlr_output *output,
.committed = pending.committed,
.when = &now,
.buffer = (pending.committed & WLR_OUTPUT_STATE_BUFFER) ? pending.buffer : NULL,
.state = &pending,
};
wl_signal_emit_mutable(&output->events.commit, &event);