diff options
Diffstat (limited to 'sway/config/output.c')
-rw-r--r-- | sway/config/output.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sway/config/output.c b/sway/config/output.c index de566869..40f86b6e 100644 --- a/sway/config/output.c +++ b/sway/config/output.c | |||
@@ -345,6 +345,9 @@ bool apply_output_config(struct output_config *oc, struct sway_output *output) { | |||
345 | return wlr_output_commit(wlr_output); | 345 | return wlr_output_commit(wlr_output); |
346 | } | 346 | } |
347 | 347 | ||
348 | bool was_enabled = output->enabled; | ||
349 | output->enabled = true; | ||
350 | |||
348 | if (!oc || oc->dpms_state != DPMS_OFF) { | 351 | if (!oc || oc->dpms_state != DPMS_OFF) { |
349 | sway_log(SWAY_DEBUG, "Turning on output %s", wlr_output->name); | 352 | sway_log(SWAY_DEBUG, "Turning on output %s", wlr_output->name); |
350 | wlr_output_enable(wlr_output, true); | 353 | wlr_output_enable(wlr_output, true); |
@@ -393,6 +396,7 @@ bool apply_output_config(struct output_config *oc, struct sway_output *output) { | |||
393 | // output disabled for now and try again when the output gets the mode | 396 | // output disabled for now and try again when the output gets the mode |
394 | // we asked for. | 397 | // we asked for. |
395 | sway_log(SWAY_ERROR, "Failed to modeset output %s", wlr_output->name); | 398 | sway_log(SWAY_ERROR, "Failed to modeset output %s", wlr_output->name); |
399 | output->enabled = was_enabled; | ||
396 | return false; | 400 | return false; |
397 | } | 401 | } |
398 | 402 | ||
@@ -432,8 +436,8 @@ bool apply_output_config(struct output_config *oc, struct sway_output *output) { | |||
432 | output->width = output_box->width; | 436 | output->width = output_box->width; |
433 | output->height = output_box->height; | 437 | output->height = output_box->height; |
434 | 438 | ||
435 | if ((!oc || oc->enabled) && !output->enabled) { | 439 | if ((!oc || oc->enabled) && !output->configured) { |
436 | output_enable(output); | 440 | output_configure(output); |
437 | } | 441 | } |
438 | 442 | ||
439 | if (oc && oc->dpms_state == DPMS_OFF) { | 443 | if (oc && oc->dpms_state == DPMS_OFF) { |