aboutsummaryrefslogtreecommitdiff
path: root/sway/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/config.c')
-rw-r--r--sway/config.c6
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) {
success = success && load_config(path, config,
&config->swaynag_config_errors);
+ if (validating) {
+ free_config(config);
+ config = old_config;
+ return success;
+ }
+
if (is_active) {
for (int i = 0; i < config->output_configs->length; i++) {
apply_output_config_to_outputs(config->output_configs->items[i]);