+ /* Check if we need to fill one column because of an uneven
+ * amount of windows */
+ if (container->mode == MODE_STACK) {
+ if (container->stack_limit == STACK_LIMIT_COLS && (current_col % 2) != 0) {
+ xcb_change_gc_single(conn, stack_win->pixmap.gc, XCB_GC_FOREGROUND, get_colorpixel(conn, "#000000"));
+
+ int offset_x = current_col * (stack_win->rect.width / container->stack_limit_value);
+ int offset_y = current_row * decoration_height;
+ xcb_rectangle_t rect = {offset_x, offset_y,
+ offset_x + container->width,
+ offset_y + decoration_height };
+ xcb_poly_fill_rectangle(conn, stack_win->pixmap.id, stack_win->pixmap.gc, 1, &rect);
+ } else if (container->stack_limit == STACK_LIMIT_ROWS && (current_row % 2) != 0) {
+ xcb_change_gc_single(conn, stack_win->pixmap.gc, XCB_GC_FOREGROUND, get_colorpixel(conn, "#000000"));
+
+ int offset_x = current_col * wrap;
+ int offset_y = current_row * decoration_height;
+ xcb_rectangle_t rect = {offset_x, offset_y,
+ offset_x + container->width,
+ offset_y + decoration_height };
+ xcb_poly_fill_rectangle(conn, stack_win->pixmap.id, stack_win->pixmap.gc, 1, &rect);
+ }
+ }
+
+ if (stack_win->pixmap.id == XCB_NONE)
+ return;