diff options
author | Simon Ser <contact@emersion.fr> | 2019-12-27 11:47:51 +0100 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-12-30 11:24:11 -0700 |
commit | ef2332f7a648c208bb0c601f670823162f584664 (patch) | |
tree | b8b5d0b5dd51b63c42663ed2a7f55b38e25edeaa /sway/desktop | |
parent | 658b7796620407890a9251972211ac4c6b5dbaed (diff) | |
download | sway-ef2332f7a648c208bb0c601f670823162f584664.tar.xz |
Re-add support for wlr_output's atomic API
This reverts commit 724926ea6ae119956dc7b1e39c2e30c1e3657676 and
re-applies commit 6e0565e9de4247bbf0ca662565c58e0a54258d6e.
Outputs now need to be explicitly enabled when performing a modeset.
We need to roll back wlr_output_attach_render when we decide not to
render.
See also: https://github.com/swaywm/wlroots/pull/1797 (wlroots PR)
See also: https://github.com/swaywm/sway/pull/4355 (Original sway PR)
See also: https://github.com/swaywm/sway/pull/4434 (Revert sway PR)
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/output.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 6b0ceee1..b1767efc 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -560,8 +560,12 @@ int output_repaint_timer_handler(void *data) { clock_gettime(CLOCK_MONOTONIC, &now); output_render(output, &now, &damage); - } else if (surface_needs_frame) { - wlr_output_schedule_frame(output->wlr_output); + } else { + wlr_output_rollback(output->wlr_output); + + if (surface_needs_frame) { + wlr_output_schedule_frame(output->wlr_output); + } } pixman_region32_fini(&damage); |