diff options
author | Ian Fan <ianfan0@gmail.com> | 2018-09-17 13:43:27 +0100 |
---|---|---|
committer | Ian Fan <ianfan0@gmail.com> | 2018-09-18 11:36:33 +0100 |
commit | 70245c2cd5c34586fa91eb784e58471869ba66bd (patch) | |
tree | c1a0f34b5b8815ab0fee61c37aff707e756f60b3 /include/swaybar | |
parent | babd9618b93987665c11ff268463b344da698744 (diff) |
swaybar: rewrite text protocol handling
This now uses getline to correctly handle multiple or long statuses. It
also removes the struct text_protocol_state and moves its members into
the status_line struct.
Diffstat (limited to 'include/swaybar')
-rw-r--r-- | include/swaybar/status_line.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/include/swaybar/status_line.h b/include/swaybar/status_line.h index 150267cd..857948a5 100644 --- a/include/swaybar/status_line.h +++ b/include/swaybar/status_line.h @@ -12,11 +12,6 @@ enum status_protocol { PROTOCOL_I3BAR, }; -struct text_protocol_state { - char *buffer; - size_t buffer_size; -}; - enum json_node_type { JSON_NODE_UNKNOWN, JSON_NODE_ARRAY, @@ -63,7 +58,8 @@ struct status_line { const char *text; struct wl_list blocks; // i3bar_block::link - struct text_protocol_state text_state; + char *buffer; + size_t buffer_size; struct i3bar_protocol_state i3bar_state; }; |