From ea215b551d88fa59d641cd87a73cfda47b171ad5 Mon Sep 17 00:00:00 2001 From: Jason Date: Wed, 5 Sep 2018 03:31:32 +0900 Subject: [PATCH] Fix swaybar block background fill logic When a block is padded to uphold `min_width`, the background colour is now applied to the whole block rather than just the original width before padding. This brings the behaviour in-line with i3bar. --- swaybar/render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swaybar/render.c b/swaybar/render.c index b34943513..854502172 100644 --- a/swaybar/render.c +++ b/swaybar/render.c @@ -111,7 +111,7 @@ static void render_block(struct window *window, struct config *config, struct st // render background if (block->background != 0x0) { cairo_set_source_u32(window->cairo, block->background); - cairo_rectangle(window->cairo, pos - 0.5, 1, block_width, (window->height * window->scale) - 2); + cairo_rectangle(window->cairo, pos - 0.5, 1, width, (window->height * window->scale) - 2); cairo_fill(window->cairo); }