From 0d63f1abdb610686752fce6c70469899e5c59cd1 Mon Sep 17 00:00:00 2001 From: Brandon Dowdy Date: Fri, 22 Jan 2021 22:11:05 +0000 Subject: [PATCH] config/output: reflect new changes made to wlr_output_enable and wlr_output_enable_adaptive_sync Reflect and update to the new changes made to wlr_output_enable and wlr_output_enable_adaptive_sync in swaywm/wlroots#2679 --- sway/config/output.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sway/config/output.c b/sway/config/output.c index c9ec67455..f948575e7 100644 --- a/sway/config/output.c +++ b/sway/config/output.c @@ -344,12 +344,12 @@ static void queue_output_config(struct output_config *oc, if (oc && (!oc->enabled || oc->dpms_state == DPMS_OFF)) { sway_log(SWAY_DEBUG, "Turning off output %s", wlr_output->name); - wlr_output_enable(wlr_output, false); + wlr_output_disable(wlr_output); return; } sway_log(SWAY_DEBUG, "Turning on output %s", wlr_output->name); - wlr_output_enable(wlr_output, true); + wlr_output_enable(wlr_output); if (oc && oc->width > 0 && oc->height > 0) { sway_log(SWAY_DEBUG, "Set %s mode to %dx%d (%f Hz)", @@ -389,7 +389,11 @@ static void queue_output_config(struct output_config *oc, if (oc && oc->adaptive_sync != -1) { sway_log(SWAY_DEBUG, "Set %s adaptive sync to %d", wlr_output->name, oc->adaptive_sync); - wlr_output_enable_adaptive_sync(wlr_output, oc->adaptive_sync == 1); + if (oc->adaptive_sync == 1) { + wlr_output_enable_adaptive_sync(wlr_output); + } else { + wlr_output_disable_adaptive_sync(wlr_output); + } } }