garbeam@5: /* garbeam@5: * (C)opyright MMVI Anselm R. Garbe garbeam@5: * See LICENSE file for license details. garbeam@5: */ garbeam@5: garbeam@5: #include "wm.h" garbeam@5: garbeam@5: void garbeam@5: draw_bar() garbeam@5: { garbeam@26: brush.x = brush.y = 0; garbeam@26: brush.w = bw; garbeam@26: brush.h = bh; garbeam@16: draw(dpy, &brush, False, NULL); garbeam@16: garbeam@16: if(stack) { garbeam@26: brush.w = textw(&brush.font, stack->name) + bh; garbeam@16: swap((void **)&brush.fg, (void **)&brush.bg); garbeam@22: draw(dpy, &brush, True, stack->name); garbeam@16: swap((void **)&brush.fg, (void **)&brush.bg); garbeam@26: brush.x += brush.w; garbeam@16: } garbeam@16: garbeam@26: brush.w = textw(&brush.font, statustext) + bh; garbeam@26: brush.x = bx + bw - brush.w; garbeam@16: draw(dpy, &brush, False, statustext); garbeam@26: XCopyArea(dpy, brush.drawable, barwin, brush.gc, 0, 0, bw, bh, 0, 0); garbeam@5: XFlush(dpy); garbeam@5: }