output: fix missing buffer when using direct scanout

When using direct scanout back_buffer is NULL. We'd emit a commit
event with WLR_OUTPUT_STATE_BUFFER set but with a NULL buffer field,
which is non-sensical.
This commit is contained in:
Simon Ser 2022-06-29 17:42:57 +02:00
parent e26c3a02df
commit 10a821a87d
1 changed files with 1 additions and 1 deletions

View File

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