From c3d46c91450a471845821a77f765fed37433558a Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Fri, 2 May 2014 19:56:12 -0400 Subject: [PATCH] i3bar: reinit colors on barconfig update Allows bar colors to be updated on barconfig update events, such as with the ipc command `reload`. --- i3bar/src/ipc.c | 5 +++++ 1 file changed, 5 insertions(+) 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); }