diff options
author | Drew DeVault <[email protected]> | 2018-03-31 14:39:18 -0400 |
---|---|---|
committer | Drew DeVault <[email protected]> | 2018-04-02 11:09:23 -0400 |
commit | 333dbcbe72b6af95573e374b66ad6ab63f274299 (patch) | |
tree | b73facc5f8399ca6328898749941d5ae195dec8d /swaybar/status_line.c | |
parent | ee85c918317ec6a685a999db46f692c7d13cdf2a (diff) |
Render i3bar blocks
Diffstat (limited to 'swaybar/status_line.c')
-rw-r--r-- | swaybar/status_line.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/swaybar/status_line.c b/swaybar/status_line.c index c94ac6d4..cc7e217f 100644 --- a/swaybar/status_line.c +++ b/swaybar/status_line.c @@ -17,13 +17,13 @@ void status_error(struct status_line *status, const char *text) { status->text = text; } -bool handle_status_readable(struct status_line *status) { +bool status_handle_readable(struct status_line *status) { char *line; switch (status->protocol) { case PROTOCOL_ERROR: return false; case PROTOCOL_I3BAR: - if (i3bar_readable(status) > 0) { + if (i3bar_handle_readable(status) > 0) { return true; } break; @@ -66,6 +66,7 @@ bool handle_status_readable(struct status_line *status) { status->protocol = PROTOCOL_I3BAR; free(status->text_state.buffer); + wl_list_init(&status->blocks); status->i3bar_state.buffer_size = 4096; status->i3bar_state.buffer = malloc(status->i3bar_state.buffer_size); |