diff options
Diffstat (limited to 'sway/config.c')
-rw-r--r-- | sway/config.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sway/config.c b/sway/config.c index b56c4f71..8f8ed438 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -457,6 +457,12 @@ bool load_main_config(const char *file, bool is_active, bool validating) { | |||
457 | success = success && load_config(path, config, | 457 | success = success && load_config(path, config, |
458 | &config->swaynag_config_errors); | 458 | &config->swaynag_config_errors); |
459 | 459 | ||
460 | if (validating) { | ||
461 | free_config(config); | ||
462 | config = old_config; | ||
463 | return success; | ||
464 | } | ||
465 | |||
460 | if (is_active) { | 466 | if (is_active) { |
461 | for (int i = 0; i < config->output_configs->length; i++) { | 467 | for (int i = 0; i < config->output_configs->length; i++) { |
462 | apply_output_config_to_outputs(config->output_configs->items[i]); | 468 | apply_output_config_to_outputs(config->output_configs->items[i]); |