- XSetForeground(xw.dpy, dc.gc, dc.col[IS_SET(MODE_REVERSE) ? DefaultFG : DefaultBG]);
- XFillRectangle(xw.dpy, xw.buf, dc.gc,
- BORDER + x1 * xw.cw, BORDER + y1 * xw.ch,
- (x2-x1+1) * xw.cw, (y2-y1+1) * xw.ch);
+ XftDrawRect(xw.xft_draw,
+ &dc.xft_col[IS_SET(MODE_REVERSE) ? DefaultFG : DefaultBG],
+ x1, y1, x2-x1, y2-y1);
+}
+
+void
+xclearborders(void) {
+ /* top and left border */
+ xclear(0, 0, BORDER, xw.h);
+ xclear(0, 0, xw.w, BORDER);
+
+ /* lower and right border */
+ xclear(BORDER, xw.th - 1, xw.w, xw.h);
+ /* Will just draw what hasn't been drawn by the previous call. */
+ xclear(xw.tw - 1, BORDER, xw.w, xw.h - xw.th - 2);