i3 - improved tiling WM


i3bar: reinit colors on barconfig update

Patch status: merged

Patch by Tony Crisci

Long description:

Allows bar colors to be updated on barconfig update events, such as with
the ipc command `reload`.

To apply this patch, use:
curl http://cr.i3wm.org/patch/536/raw.patch | git am

b/i3bar/src/ipc.c

15
@@ -159,6 +159,8 @@ void got_bar_config_update(char *event) {
16
     if (found_id == NULL)
17
        return;
18
 
19
+    free_colors(&(config.colors));
20
+
21
     /* update the configuration with the received settings */
22
     DLOG("Received bar config update \"%s\"\n", event);
23
     bar_display_mode_t old_mode = config.hide_on_modifier;
24
@@ -167,6 +169,9 @@ void got_bar_config_update(char *event) {
25
         reconfig_windows(true);
26
     }
27
 
28
+    init_colors(&(config.colors));
29
+    realloc_sl_buffer();
30
+
31
     draw_bars(false);
32
 }
33