From: shdown Date: Sat, 21 Mar 2015 16:00:11 +0000 (+0300) Subject: i3bar: fix clearing of the statusline pixmap X-Git-Tag: 4.10.1~43^2~5 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5efcfda2eda208ce6f45e90734dfcdebfee4baad;p=i3%2Fi3 i3bar: fix clearing of the statusline pixmap This fixes the bug when statusline pixmap wasn't entirely cleared that caused random artifacts to appear when the statusline width is greater than the screen width. --- diff --git a/i3bar/src/xcb.c b/i3bar/src/xcb.c index 8bda53c4..79e9ad9c 100644 --- a/i3bar/src/xcb.c +++ b/i3bar/src/xcb.c @@ -174,7 +174,7 @@ void refresh_statusline(void) { realloc_sl_buffer(); /* Clear the statusline pixmap. */ - xcb_rectangle_t rect = {0, 0, root_screen->width_in_pixels, bar_height}; + xcb_rectangle_t rect = {0, 0, MAX(root_screen->width_in_pixels, statusline_width), bar_height}; xcb_poly_fill_rectangle(xcb_connection, statusline_pm, statusline_clear, 1, &rect); /* Draw the text of each block. */