From aaa0923bc4fe4ffda114482a9b8023c90c26c8dc Mon Sep 17 00:00:00 2001 From: taiyu Date: Thu, 10 Sep 2015 11:07:40 -0700 Subject: cmd status + workspace ws output op --- sway/config.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sway/config.c') diff --git a/sway/config.c b/sway/config.c index 11394a7c..23d6ac0d 100644 --- a/sway/config.c +++ b/sway/config.c @@ -102,6 +102,7 @@ static void config_defaults(struct sway_config *config) { config->active = false; config->failed = false; config->auto_back_and_forth = false; + config->reading = false; config->gaps_inner = 0; config->gaps_outer = 0; @@ -217,6 +218,7 @@ bool read_config(FILE *file, bool is_active) { config = malloc(sizeof(struct sway_config)); config_defaults(config); + config->reading = true; if (is_active) { sway_log(L_DEBUG, "Performing configuration file reload"); config->reloading = true; @@ -228,7 +230,8 @@ bool read_config(FILE *file, bool is_active) { while (!feof(file)) { line = read_line(file); line = strip_comments(line); - if (!config_command(line)) { + if (config_command(line) == CMD_FAILURE) { + sway_log(L_ERROR, "Error on line '%s'", line); success = false; } free(line); @@ -242,6 +245,7 @@ bool read_config(FILE *file, bool is_active) { free_config(old_config); } + config->reading = false; return success; } -- cgit v1.2.3