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

View file

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