aboutsummaryrefslogtreecommitdiff
path: root/swaybar/i3bar.c
AgeCommit message (Collapse)AuthorLines
2018-09-21swaybar: log invalid i3bar jsonIan Fan-3/+12
2018-09-21swaybar: reset tokener if json is incompleteIan Fan-0/+1
If the tokener parses incomplete json, it sets its error value to json_tokener_continue. This means that extra json should be provided, but the code was providing the entire object again. In the interest of simplicity, the tokener is reset so that buffer_pos always points to the start of the current object.
2018-09-21swaybar: update buffer_pos when moving object to start of bufferIan Fan-0/+1
2018-09-18swaybar: add debugging statements for handling i3bar jsonIan Fan-0/+16
2018-09-18swaybar: rewrite i3bar protocol handlingIan Fan-78/+111
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.
2018-09-18swaybar: send trailing comma with click event jsonIan Fan-1/+1
2018-09-14bar: remove i3bar_block_free in favour of i3bar_block_unrefIan Fan-12/+9
2018-09-12i3bar: count references to blocksIan Fan-3/+10
This prevents blocks from being destroyed before their hotspots are destroyed, in case it is used for a pending click event that fires between the bar receiving a new status, which destroys the block, and the bar rendering the new status, which destroys the hotspot; this problem can be easily produced by scrolling on a block that immediately causes a new status to be sent, with multiple outputs
2018-07-19swaybar: Fix scroll handling on workspace buttonsminus-2/+3
As well as ignoring scroll events on status elements when click_events is enabled. Previously, using the scroll wheel on a workspace button would switch to that workspace instead of scrolling through them. Clicks and scrolling on status elements would always be processed by swaybar, too. So in case you were using scrolling as volume control on a status item, swaybar would additionally scroll through your workspaces.
2018-07-17remove unnecessary parensPeter Rice-5/+5
2018-07-16make hotspot callback take an x11 button idPeter Rice-1/+31
2018-07-09Update for swaywm/wlroots#1126emersion-2/+2
2018-04-24Fix a bunch of swaybar memory leaksemersion-1/+2
2018-04-20Fix memory leak on swaybarBruno Pinto-0/+1
Code from @NilsBrause Ref #1820
2018-04-09Fix some more bugsDrew DeVault-3/+4
2018-04-09Fix buffer issues in swaybar status line.Ryan Dwyer-0/+3
2018-04-03Fix #1709Drew DeVault-1/+4
2018-04-02Fix use-after-free with block hotspotsDrew DeVault-3/+1
2018-04-02Send click events for i3bar blocksDrew DeVault-0/+22
2018-04-02Render i3bar blocksDrew DeVault-10/+110
2018-04-02Demarcate i3bar JSON into individual updatesDrew DeVault-0/+88