]> git.sur5r.net Git - i3/i3/commitdiff
i3bar: fix clearing of the statusline pixmap
authorshdown <shdownnine@gmail.com>
Sat, 21 Mar 2015 16:00:11 +0000 (19:00 +0300)
committershdown <shdownnine@gmail.com>
Sat, 21 Mar 2015 16:00:11 +0000 (19:00 +0300)
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.

i3bar/src/xcb.c

index 8bda53c45ea656c289acb0b61696787ee9c39c60..79e9ad9c24b0b504e0f4f173b714b587f08074dc 100644 (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. */