diff options
author | Simon Ser <contact@emersion.fr> | 2024-04-12 18:44:07 +0200 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2024-04-13 00:55:28 +0200 |
commit | 087226d997c15f4df30542778854999c632642a3 (patch) | |
tree | 5bc5480136f1728921fbb7c9790bee9fe727134b | |
parent | config/output: fix NULL derefs in store_output_config() (diff) | |
download | sway-087226d997c15f4df30542778854999c632642a3.tar.gz sway-087226d997c15f4df30542778854999c632642a3.tar.zst sway-087226d997c15f4df30542778854999c632642a3.zip |
config/output: drop fast path in store_output_config()
If there is no output currently connected, we still want to merge
to any existing config.
It shouldn't matter to iterate over the list of outputs to do
nothing anwyays.
-rw-r--r-- | sway/config/output.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/sway/config/output.c b/sway/config/output.c index aab3f0bd..54af5d8e 100644 --- a/sway/config/output.c +++ b/sway/config/output.c | |||
@@ -211,10 +211,6 @@ void 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 : output_by_name_or_id(oc->name); |
214 | if (!output && !wildcard) { | ||
215 | // There is no config by this name, just add it in | ||
216 | goto done; | ||
217 | } | ||
218 | 214 | ||
219 | char id[128]; | 215 | char id[128]; |
220 | if (output) { | 216 | if (output) { |
@@ -249,7 +245,6 @@ void store_output_config(struct output_config *oc) { | |||
249 | } | 245 | } |
250 | } | 246 | } |
251 | 247 | ||
252 | done: | ||
253 | sway_log(SWAY_DEBUG, "Config stored for output %s (enabled: %d) (%dx%d@%fHz " | 248 | sway_log(SWAY_DEBUG, "Config stored for output %s (enabled: %d) (%dx%d@%fHz " |
254 | "position %d,%d scale %f subpixel %s transform %d) (bg %s %s) (power %d) " | 249 | "position %d,%d scale %f subpixel %s transform %d) (bg %s %s) (power %d) " |
255 | "(max render time: %d)", | 250 | "(max render time: %d)", |