aboutsummaryrefslogtreecommitdiff
path: root/sway/config
diff options
context:
space:
mode:
Diffstat (limited to 'sway/config')
-rw-r--r--sway/config/output.c8
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) {
oc->transform = -1;
oc->subpixel = WL_OUTPUT_SUBPIXEL_UNKNOWN;
oc->max_render_time = -1;
+ oc->adaptive_sync = -1;
return oc;
}
@@ -104,6 +105,9 @@ void merge_output_config(struct output_config *dst, struct output_config *src) {
if (src->max_render_time != -1) {
dst->max_render_time = src->max_render_time;
}
+ if (src->adaptive_sync != -1) {
+ dst->adaptive_sync = src->adaptive_sync;
+ }
if (src->background) {
free(dst->background);
dst->background = strdup(src->background);
@@ -390,6 +394,10 @@ bool apply_output_config(struct output_config *oc, struct sway_output *output) {
wlr_output_set_scale(wlr_output, scale);
}
+ if (oc && oc->adaptive_sync != -1) {
+ wlr_output_enable_adaptive_sync(wlr_output, oc->adaptive_sync == 1);
+ }
+
sway_log(SWAY_DEBUG, "Committing output %s", wlr_output->name);
if (!wlr_output_commit(wlr_output)) {
// Failed to modeset, maybe the output is missing a CRTC. Leave the