diff options
author | emersion <contact@emersion.fr> | 2018-09-01 18:56:53 +0200 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-09-01 18:56:53 +0200 |
commit | 349d1f3be87ad9fd49482f64c71eb2665750261b (patch) | |
tree | f3f31dfb8145dc76031c784f68b551bd8b3f8d82 /sway/config/output.c | |
parent | 89a045835f284e368f36ea5b508f70a41f65d6be (diff) |
Do not modeset disabled outputs
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 16ec9339..65f09258 100644 --- a/sway/config/output.c +++ b/sway/config/output.c @@ -196,6 +196,10 @@ void apply_output_config(struct output_config *oc, struct sway_container *output wlr_log(WLR_DEBUG, "Set %s mode to %dx%d (%f GHz)", oc->name, oc->width, oc->height, oc->refresh_rate); set_mode(wlr_output, oc->width, oc->height, oc->refresh_rate); + } else if (!wl_list_empty(&wlr_output->modes)) { + struct wlr_output_mode *mode = + wl_container_of(wlr_output->modes.prev, mode, link); + wlr_output_set_mode(wlr_output, mode); } if (oc && oc->scale > 0) { wlr_log(WLR_DEBUG, "Set %s scale to %f", oc->name, oc->scale); |