summaryrefslogtreecommitdiffstats
path: root/swaybar/i3bar.c
diff options
context:
space:
mode:
Diffstat (limited to 'swaybar/i3bar.c')
-rw-r--r--swaybar/i3bar.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/swaybar/i3bar.c b/swaybar/i3bar.c
index da93a132..43e2fe2d 100644
--- a/swaybar/i3bar.c
+++ b/swaybar/i3bar.c
@@ -21,6 +21,7 @@ void i3bar_block_unref(struct i3bar_block *block) {
21 free(block->full_text); 21 free(block->full_text);
22 free(block->short_text); 22 free(block->short_text);
23 free(block->align); 23 free(block->align);
24 free(block->min_width_str);
24 free(block->name); 25 free(block->name);
25 free(block->instance); 26 free(block->instance);
26 free(block->color); 27 free(block->color);
@@ -78,7 +79,7 @@ static void i3bar_parse_json(struct status_line *status,
78 block->min_width = json_object_get_int(min_width); 79 block->min_width = json_object_get_int(min_width);
79 } else if (type == json_type_string) { 80 } else if (type == json_type_string) {
80 /* the width will be calculated when rendering */ 81 /* the width will be calculated when rendering */
81 block->min_width = 0; 82 block->min_width_str = strdup(json_object_get_string(min_width));
82 } 83 }
83 } 84 }
84 block->align = strdup(align ? json_object_get_string(align) : "left"); 85 block->align = strdup(align ? json_object_get_string(align) : "left");