diff options
-rw-r--r-- | sway/config/output.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sway/config/output.c b/sway/config/output.c index 5656e2c1..44aae03a 100644 --- a/sway/config/output.c +++ b/sway/config/output.c | |||
@@ -493,19 +493,20 @@ static struct output_config *get_output_config(char *identifier, | |||
493 | free(result->name); | 493 | free(result->name); |
494 | result->name = strdup(identifier); | 494 | result->name = strdup(identifier); |
495 | merge_output_config(result, oc_id); | 495 | merge_output_config(result, oc_id); |
496 | } else if (config->reloading) { | 496 | } else { |
497 | // Neither config exists, but we need to reset the output so create a | ||
498 | // default config for the output and if a wildcard config exists, merge | ||
499 | // that on top | ||
500 | free(result->name); | ||
501 | result->name = strdup("*"); | ||
502 | i = list_seq_find(config->output_configs, output_name_cmp, "*"); | 497 | i = list_seq_find(config->output_configs, output_name_cmp, "*"); |
503 | if (i >= 0) { | 498 | if (i >= 0) { |
499 | // No name or identifier config, but there is a wildcard config | ||
500 | free(result->name); | ||
501 | result->name = strdup("*"); | ||
504 | merge_output_config(result, config->output_configs->items[i]); | 502 | merge_output_config(result, config->output_configs->items[i]); |
503 | } else if (!config->reloading) { | ||
504 | // No name, identifier, or wildcard config. Since we are not | ||
505 | // reloading with defaults, the output config will be empty, so | ||
506 | // just return NULL | ||
507 | free_output_config(result); | ||
508 | result = NULL; | ||
505 | } | 509 | } |
506 | } else { | ||
507 | free_output_config(result); | ||
508 | result = NULL; | ||
509 | } | 510 | } |
510 | 511 | ||
511 | free(id_on_name); | 512 | free(id_on_name); |