diff options
-rw-r--r-- | sway/config/output.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/sway/config/output.c b/sway/config/output.c index 1a37c47c..8dfa8c57 100644 --- a/sway/config/output.c +++ b/sway/config/output.c @@ -345,20 +345,17 @@ static void queue_output_config(struct output_config *oc, return; } - if (!oc) { - sway_log(SWAY_DEBUG, "Turning on output %s", wlr_output->name); - wlr_output_enable(wlr_output, true); - - if (oc && oc->width > 0 && oc->height > 0) { - sway_log(SWAY_DEBUG, "Set %s mode to %dx%d (%f Hz)", - wlr_output->name, oc->width, oc->height, oc->refresh_rate); - set_mode(wlr_output, oc->width, oc->height, - oc->refresh_rate, oc->custom_mode == 1); - } else if (!wl_list_empty(&wlr_output->modes)) { - struct wlr_output_mode *mode = wlr_output_preferred_mode(wlr_output); - wlr_output_set_mode(wlr_output, mode); - } - output->current_mode = wlr_output->pending.mode; + sway_log(SWAY_DEBUG, "Turning on output %s", wlr_output->name); + wlr_output_enable(wlr_output, true); + + if (oc && oc->width > 0 && oc->height > 0) { + sway_log(SWAY_DEBUG, "Set %s mode to %dx%d (%f Hz)", + wlr_output->name, oc->width, oc->height, oc->refresh_rate); + set_mode(wlr_output, oc->width, oc->height, + oc->refresh_rate, oc->custom_mode == 1); + } else if (!wl_list_empty(&wlr_output->modes)) { + struct wlr_output_mode *mode = wlr_output_preferred_mode(wlr_output); + wlr_output_set_mode(wlr_output, mode); } if (oc && (oc->subpixel != WL_OUTPUT_SUBPIXEL_UNKNOWN || config->reloading)) { |