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/output.c | |
parent | Add Chinese (zh-TW) translation of README (diff) | |
download | sway-ef2332f7a648c208bb0c601f670823162f584664.tar.gz sway-ef2332f7a648c208bb0c601f670823162f584664.tar.zst sway-ef2332f7a648c208bb0c601f670823162f584664.zip |
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/output.c')
-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) { | |||
560 | clock_gettime(CLOCK_MONOTONIC, &now); | 560 | clock_gettime(CLOCK_MONOTONIC, &now); |
561 | 561 | ||
562 | output_render(output, &now, &damage); | 562 | output_render(output, &now, &damage); |
563 | } else if (surface_needs_frame) { | 563 | } else { |
564 | wlr_output_schedule_frame(output->wlr_output); | 564 | wlr_output_rollback(output->wlr_output); |
565 | |||
566 | if (surface_needs_frame) { | ||
567 | wlr_output_schedule_frame(output->wlr_output); | ||
568 | } | ||
565 | } | 569 | } |
566 | 570 | ||
567 | pixman_region32_fini(&damage); | 571 | pixman_region32_fini(&damage); |