From: Tony Crisci Date: Fri, 2 May 2014 23:56:12 +0000 (-0400) Subject: i3bar: reinit colors on barconfig update X-Git-Tag: 4.8~51 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c3d46c91450a471845821a77f765fed37433558a;p=i3%2Fi3 i3bar: reinit colors on barconfig update Allows bar colors to be updated on barconfig update events, such as with the ipc command `reload`. --- diff --git a/i3bar/src/ipc.c b/i3bar/src/ipc.c index 6a2c0e62..71e2eda9 100644 --- a/i3bar/src/ipc.c +++ b/i3bar/src/ipc.c @@ -159,6 +159,8 @@ void got_bar_config_update(char *event) { if (found_id == NULL) return; + free_colors(&(config.colors)); + /* update the configuration with the received settings */ DLOG("Received bar config update \"%s\"\n", event); bar_display_mode_t old_mode = config.hide_on_modifier; @@ -167,6 +169,9 @@ void got_bar_config_update(char *event) { reconfig_windows(true); } + init_colors(&(config.colors)); + realloc_sl_buffer(); + draw_bars(false); }