summaryrefslogtreecommitdiffstats
path: root/swaybar/main.c
diff options
context:
space:
mode:
authorLibravatar Ludvig Michaelsson <ludvig.michaelsson@gmail.com>2020-09-20 17:26:18 +0200
committerLibravatar Simon Ser <contact@emersion.fr>2020-10-12 16:02:41 +0200
commitd6ac30753ded44c5f1921a3bbccb5856d5ef6539 (patch)
tree50475c92ec38ca6cf04495ba1f6b2d63c11c3dc7 /swaybar/main.c
parentinput/tablet: add tool_mode option to set tablet tools as relative input (diff)
downloadsway-d6ac30753ded44c5f1921a3bbccb5856d5ef6539.tar.gz
sway-d6ac30753ded44c5f1921a3bbccb5856d5ef6539.tar.zst
sway-d6ac30753ded44c5f1921a3bbccb5856d5ef6539.zip
swaybar: don't expand separator_block_width if separator is false
When swaybar receives the following JSON body [ { "full_text": "foo", "separator": false, "separator_block_width": 0 }, { "full_text": "bar" } ] it should not draw any separator or any space between the two blocks. However, since swaybar calculates that separator_block_width 0 is too small to fit any configured separator, it will override the separator_block_width with some non-zero value. This patch changes that such that the necessary separator_block_width is only expanded if the block has 'separator: true'. This should be in line to what i3 does, as its documentation of the i3bar protocol for separator states that "[...] if you disable the separator line, there will still be a gap after the block, unless you also use separator_block_width".
Diffstat (limited to 'swaybar/main.c')
0 files changed, 0 insertions, 0 deletions