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.
Simon Ser 2 years ago
parent e26c3a02df
commit 10a821a87d

@ -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);

Loading…
Cancel
Save