From 0a72f2d5352732e67074a7b87f5b511bcf3eabc1 Mon Sep 17 00:00:00 2001 From: Orestis Floros Date: Mon, 16 Apr 2018 01:37:18 +0300 Subject: [PATCH] i3bar: don't reset verbosity when parsing config values When i3bar is called with the -V flag but there is no 'verbose yes' directive in the bar {} config, the verbosity config value is reset. This will introduce the opposite, negligible issue: you can't disable i3bar's verbosity by deleting the 'verbose yes' directive in the bar {} config. To fix this we would need an enum for config.verbose. Closes #3220. --- i3bar/src/config.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/i3bar/src/config.c b/i3bar/src/config.c index 59a44aee..ccbe6169 100644 --- a/i3bar/src/config.c +++ b/i3bar/src/config.c @@ -304,8 +304,10 @@ static int config_boolean_cb(void *params_, int val) { } if (!strcmp(cur_key, "verbose")) { - DLOG("verbose = %d\n", val); - config.verbose = val; + if (!config.verbose) { + DLOG("verbose = %d\n", val); + config.verbose = val; + } return 1; }