diff options
author | Ian Fan <ianfan0@gmail.com> | 2018-09-17 14:10:57 +0100 |
---|---|---|
committer | Ian Fan <ianfan0@gmail.com> | 2018-09-18 11:36:33 +0100 |
commit | 7882ac66ef4308922045fd100e6a9e12942a240b (patch) | |
tree | 67ce4f14f56372c86eb9992eef354d1d76f3081d /swaybar/render.c | |
parent | swaybar: rewrite protocol determination (diff) | |
download | sway-7882ac66ef4308922045fd100e6a9e12942a240b.tar.gz sway-7882ac66ef4308922045fd100e6a9e12942a240b.tar.zst sway-7882ac66ef4308922045fd100e6a9e12942a240b.zip |
swaybar: rewrite i3bar protocol handling
This now correctly handles an incoming json infinite array by shifting
most of the heavy listing to the json-c parser, as well as sending
multiple statuses at once. It also removes the struct
i3bar_protocol_state and moves its members into the status_line struct,
allowing the same buffer to be used for both protocols.
Diffstat (limited to 'swaybar/render.c')
-rw-r--r-- | swaybar/render.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/swaybar/render.c b/swaybar/render.c index b2c1c710..97690338 100644 --- a/swaybar/render.c +++ b/swaybar/render.c | |||
@@ -177,7 +177,7 @@ static uint32_t render_status_block(cairo_t *cairo, | |||
177 | *x -= margin; | 177 | *x -= margin; |
178 | } | 178 | } |
179 | 179 | ||
180 | if (output->bar->status->i3bar_state.click_events) { | 180 | if (output->bar->status->click_events) { |
181 | struct swaybar_hotspot *hotspot = calloc(1, sizeof(struct swaybar_hotspot)); | 181 | struct swaybar_hotspot *hotspot = calloc(1, sizeof(struct swaybar_hotspot)); |
182 | hotspot->x = *x; | 182 | hotspot->x = *x; |
183 | hotspot->y = 0; | 183 | hotspot->y = 0; |