diff options
Diffstat (limited to 'sway/config/output.c')
-rw-r--r-- | sway/config/output.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sway/config/output.c b/sway/config/output.c index 40f86b6e..cbcf713b 100644 --- a/sway/config/output.c +++ b/sway/config/output.c | |||
@@ -64,6 +64,7 @@ struct output_config *new_output_config(const char *name) { | |||
64 | oc->transform = -1; | 64 | oc->transform = -1; |
65 | oc->subpixel = WL_OUTPUT_SUBPIXEL_UNKNOWN; | 65 | oc->subpixel = WL_OUTPUT_SUBPIXEL_UNKNOWN; |
66 | oc->max_render_time = -1; | 66 | oc->max_render_time = -1; |
67 | oc->adaptive_sync = -1; | ||
67 | return oc; | 68 | return oc; |
68 | } | 69 | } |
69 | 70 | ||
@@ -104,6 +105,9 @@ void merge_output_config(struct output_config *dst, struct output_config *src) { | |||
104 | if (src->max_render_time != -1) { | 105 | if (src->max_render_time != -1) { |
105 | dst->max_render_time = src->max_render_time; | 106 | dst->max_render_time = src->max_render_time; |
106 | } | 107 | } |
108 | if (src->adaptive_sync != -1) { | ||
109 | dst->adaptive_sync = src->adaptive_sync; | ||
110 | } | ||
107 | if (src->background) { | 111 | if (src->background) { |
108 | free(dst->background); | 112 | free(dst->background); |
109 | dst->background = strdup(src->background); | 113 | dst->background = strdup(src->background); |
@@ -390,6 +394,10 @@ bool apply_output_config(struct output_config *oc, struct sway_output *output) { | |||
390 | wlr_output_set_scale(wlr_output, scale); | 394 | wlr_output_set_scale(wlr_output, scale); |
391 | } | 395 | } |
392 | 396 | ||
397 | if (oc && oc->adaptive_sync != -1) { | ||
398 | wlr_output_enable_adaptive_sync(wlr_output, oc->adaptive_sync == 1); | ||
399 | } | ||
400 | |||
393 | sway_log(SWAY_DEBUG, "Committing output %s", wlr_output->name); | 401 | sway_log(SWAY_DEBUG, "Committing output %s", wlr_output->name); |
394 | if (!wlr_output_commit(wlr_output)) { | 402 | if (!wlr_output_commit(wlr_output)) { |
395 | // Failed to modeset, maybe the output is missing a CRTC. Leave the | 403 | // Failed to modeset, maybe the output is missing a CRTC. Leave the |