aboutsummaryrefslogtreecommitdiffstats
path: root/sway
diff options
context:
space:
mode:
authorLibravatar Simon Ser <contact@emersion.fr>2024-03-08 12:35:10 +0100
committerLibravatar Simon Zeni <simon@bl4ckb0ne.ca>2024-03-08 09:12:12 -0500
commit23389ebd1f301403e4b2331855a224dff89e1ad1 (patch)
treeb12a573fbbec834da552fe483e0ab1622104087b /sway
parentxdg-shell: send WM capabilities (diff)
downloadsway-23389ebd1f301403e4b2331855a224dff89e1ad1.tar.gz
sway-23389ebd1f301403e4b2331855a224dff89e1ad1.tar.zst
sway-23389ebd1f301403e4b2331855a224dff89e1ad1.zip
config/output: drop enabling flag
This was useful when wlroots backends were updating the current mode on their own. This is no longer the case.
Diffstat (limited to 'sway')
-rw-r--r--sway/config/output.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/sway/config/output.c b/sway/config/output.c
index 55779771..1b2332e9 100644
--- a/sway/config/output.c
+++ b/sway/config/output.c
@@ -510,9 +510,6 @@ bool apply_output_config(struct output_config *oc, struct sway_output *output) {
510 510
511 struct wlr_output *wlr_output = output->wlr_output; 511 struct wlr_output *wlr_output = output->wlr_output;
512 512
513 // Flag to prevent the output mode event handler from calling us
514 output->enabling = (!oc || oc->enabled);
515
516 struct wlr_output_state pending = {0}; 513 struct wlr_output_state pending = {0};
517 queue_output_config(oc, output, &pending); 514 queue_output_config(oc, output, &pending);
518 515
@@ -522,12 +519,9 @@ bool apply_output_config(struct output_config *oc, struct sway_output *output) {
522 // Leave the output disabled for now and try again when the output gets 519 // Leave the output disabled for now and try again when the output gets
523 // the mode we asked for. 520 // the mode we asked for.
524 sway_log(SWAY_ERROR, "Failed to commit output %s", wlr_output->name); 521 sway_log(SWAY_ERROR, "Failed to commit output %s", wlr_output->name);
525 output->enabling = false;
526 return false; 522 return false;
527 } 523 }
528 524
529 output->enabling = false;
530
531 if (oc && !oc->enabled) { 525 if (oc && !oc->enabled) {
532 sway_log(SWAY_DEBUG, "Disabling output %s", oc->name); 526 sway_log(SWAY_DEBUG, "Disabling output %s", oc->name);
533 if (output->enabled) { 527 if (output->enabled) {