diff options
author | Simon Ser <contact@emersion.fr> | 2022-06-28 17:47:15 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2022-08-30 20:15:29 +0200 |
commit | 07bfeb2abcb46b5f1472d53963478fa0714fb5b1 (patch) | |
tree | 2d8bc8f2303c498c3805969c53ac967fdbe1901d /sway/config/output.c | |
parent | aaa6c4ac892ddba1aa1892221324359a77e2eb3a (diff) |
config/output: test adaptive sync
Required for [1].
[1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3637
Diffstat (limited to 'sway/config/output.c')
-rw-r--r-- | sway/config/output.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/config/output.c b/sway/config/output.c index b3e8371e..9c7082d0 100644 --- a/sway/config/output.c +++ b/sway/config/output.c @@ -463,6 +463,10 @@ static void queue_output_config(struct output_config *oc, sway_log(SWAY_DEBUG, "Set %s adaptive sync to %d", wlr_output->name, oc->adaptive_sync); wlr_output_state_set_adaptive_sync_enabled(pending, oc->adaptive_sync == 1); + if (oc->adaptive_sync == 1 && !wlr_output_test_state(wlr_output, pending)) { + sway_log(SWAY_DEBUG, "Adaptive sync failed, ignoring"); + wlr_output_state_set_adaptive_sync_enabled(pending, false); + } } if (oc && oc->render_bit_depth != RENDER_BIT_DEPTH_DEFAULT) { |