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=0a72f2d5352732e67074a7b87f5b511bcf3eabc1;hp=ab47d664c2f9ce1fd5f76b7c20c85bb9bdc742b4;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; }