aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Kenny Levinsen <kl@kl.wtf>2024-05-01 14:19:54 +0200
committerLibravatar Simon Zeni <simon@bl4ckb0ne.ca>2024-05-02 08:44:04 -0400
commitee5c4f38c9db849b6c4034e792b451eb8d6d2627 (patch)
tree946b8f869e8df8ab3fea3e51e55f61ac4874656f
parentdesktop/output: Fix check if config should be stored (diff)
downloadsway-ee5c4f38c9db849b6c4034e792b451eb8d6d2627.tar.gz
sway-ee5c4f38c9db849b6c4034e792b451eb8d6d2627.tar.zst
sway-ee5c4f38c9db849b6c4034e792b451eb8d6d2627.zip
config/output: Use all outputs for config merge
When storing a config, we need to find the output that is being configured to extract its identifier. output_by_name_or_id does not return outputs that are disabled, and using this makes it impossible to merge configurations related to disabled outputs. Switch to all_outputs_by_name_or_id. Fixes: https://github.com/swaywm/sway/issues/8141
-rw-r--r--sway/config/output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/config/output.c b/sway/config/output.c
index 54af5d8e..7e037676 100644
--- a/sway/config/output.c
+++ b/sway/config/output.c
@@ -210,7 +210,7 @@ static void merge_output_config(struct output_config *dst, struct output_config
210void store_output_config(struct output_config *oc) { 210void store_output_config(struct output_config *oc) {
211 bool merged = false; 211 bool merged = false;
212 bool wildcard = strcmp(oc->name, "*") == 0; 212 bool wildcard = strcmp(oc->name, "*") == 0;
213 struct sway_output *output = wildcard ? NULL : output_by_name_or_id(oc->name); 213 struct sway_output *output = wildcard ? NULL : all_output_by_name_or_id(oc->name);
214 214
215 char id[128]; 215 char id[128];
216 if (output) { 216 if (output) {