mirror of
https://github.com/swaywm/sway.git
synced 2026-03-27 07:58:40 -04:00
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.
This commit is contained in:
parent
8cbce77e1d
commit
7882ac66ef
4 changed files with 128 additions and 118 deletions
|
|
@ -177,7 +177,7 @@ static uint32_t render_status_block(cairo_t *cairo,
|
|||
*x -= margin;
|
||||
}
|
||||
|
||||
if (output->bar->status->i3bar_state.click_events) {
|
||||
if (output->bar->status->click_events) {
|
||||
struct swaybar_hotspot *hotspot = calloc(1, sizeof(struct swaybar_hotspot));
|
||||
hotspot->x = *x;
|
||||
hotspot->y = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue