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.
This commit is contained in:
shdown 2015-03-21 19:00:11 +03:00
parent e7753c839f
commit 5efcfda2ed

View File

@ -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. */