aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-04-09 10:18:40 +0200
committerDrew DeVault <sir@cmpwn.com>2020-04-09 15:45:29 +0200
commit34dccd4224bc775980ea6181f404808229346288 (patch)
tree938a015d9d2c9c48c41bab58d5f12383d8aef576
parent97a6524a5acfe32d1ebb08bf18d86aa3fb942a14 (diff)
Don't add disabled outputs back to output layout
Return early from apply_output_config if the output is disabled. This restores our previous behavior [1]. [1]: https://github.com/swaywm/sway/commit/0cdcf66bbccfeb1e3a8191cedd5f824bb27776a6#diff-4f65f4327e987fef8ec3796cdb07644eL349
-rw-r--r--sway/config/output.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sway/config/output.c b/sway/config/output.c
index 8dfa8c57..19b9989a 100644
--- a/sway/config/output.c
+++ b/sway/config/output.c
@@ -425,6 +425,10 @@ bool apply_output_config(struct output_config *oc, struct sway_output *output) {
return false;
}
+ if (oc && !oc->enabled) {
+ return true;
+ }
+
if (config->reloading) {
output_damage_whole(output);
}
@@ -464,7 +468,7 @@ bool apply_output_config(struct output_config *oc, struct sway_output *output) {
output->width = output_box->width;
output->height = output_box->height;
- if ((!oc || oc->enabled) && !output->configured) {
+ if (!output->configured) {
output_configure(output);
}