diff options
author | Simon Ser <contact@emersion.fr> | 2020-12-09 21:59:23 +0100 |
---|---|---|
committer | Tudor Brindus <me@tbrindus.ca> | 2020-12-20 00:51:46 -0500 |
commit | 33b64667ae0bfe9af752cb8c850b4f52b34660d2 (patch) | |
tree | 665ef8858dd8c084c002905831127c80a3aac075 /sway/desktop | |
parent | fce8287a06bdf1f951c9d48fb0b799ed86a0210b (diff) |
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
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/output.c | 6 |
1 files changed, 5 insertions, 1 deletions
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); } |