From 10a821a87ddabfdef50f8c5a562c3aea44215019 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 29 Jun 2022 17:42:57 +0200 Subject: [PATCH] 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. --- types/output/output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/output/output.c b/types/output/output.c index ae18ea8d..b45576fa 100644 --- a/types/output/output.c +++ b/types/output/output.c @@ -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);