dwm-meillo

view bar.c @ 30:2e0fb4130bfb

new stuff, fixed several issues
author Anselm R. Garbe <garbeam@wmii.de>
date Wed, 12 Jul 2006 17:50:31 +0200
parents bd3a44353916
children 386649deb651
line source
1 /*
2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
3 * See LICENSE file for license details.
4 */
6 #include "wm.h"
8 void
9 draw_bar()
10 {
11 brush.x = brush.y = 0;
12 brush.w = bw;
13 brush.h = bh;
14 draw(dpy, &brush, False, NULL);
16 if(stack) {
17 brush.w = textw(&brush.font, stack->name) + bh;
18 swap((void **)&brush.fg, (void **)&brush.bg);
19 draw(dpy, &brush, True, stack->name);
20 swap((void **)&brush.fg, (void **)&brush.bg);
21 brush.x += brush.w;
22 }
24 brush.w = textw(&brush.font, statustext) + bh;
25 brush.x = bx + bw - brush.w;
26 draw(dpy, &brush, False, statustext);
27 XCopyArea(dpy, brush.drawable, barwin, brush.gc, 0, 0, bw, bh, 0, 0);
28 XFlush(dpy);
29 }