From 33b64667ae0bfe9af752cb8c850b4f52b34660d2 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 9 Dec 2020 21:59:23 +0100 Subject: [PATCH] Test output before direct scan-out This avoids some log spam. Eventually when we wire up the atomic test commit this will take care of the other log spam referenced below. References: https://github.com/swaywm/sway/pull/5010 References: https://github.com/swaywm/wlroots/issues/2181 Closes: https://github.com/swaywm/wlroots/issues/2532 --- sway/desktop/output.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sway/desktop/output.c b/sway/desktop/output.c index c21cdb00..06acb868 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -548,10 +548,14 @@ static bool scan_out_fullscreen_view(struct sway_output *output, return false; } + wlr_output_attach_buffer(wlr_output, &surface->buffer->base); + if (!wlr_output_test(wlr_output)) { + return false; + } + wlr_presentation_surface_sampled_on_output(server.presentation, surface, wlr_output); - wlr_output_attach_buffer(wlr_output, &surface->buffer->base); return wlr_output_commit(wlr_output); }