From: Orestis Floros Date: Sun, 15 Apr 2018 22:37:18 +0000 (+0300) Subject: i3bar: don't reset verbosity when parsing config values X-Git-Tag: 4.16~98^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=refs%2Fpull%2F3244%2Fhead;p=i3%2Fi3 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. --- 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; }