dwm-meillo

view bar.c @ 16:359b6e563b95

several changes, new stuff
author Anselm R. Garbe <garbeam@wmii.de>
date Tue, 11 Jul 2006 18:53:41 +0200
parents 5c078b66347b
children bd3a44353916
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.rect = barrect;
12 brush.rect.x = brush.rect.y = 0;
13 draw(dpy, &brush, False, NULL);
15 if(stack) {
16 brush.rect.width = textwidth(&brush.font, stack->name) + labelheight(&brush.font);
17 swap((void **)&brush.fg, (void **)&brush.bg);
18 draw(dpy, &brush, False, stack->name);
19 swap((void **)&brush.fg, (void **)&brush.bg);
20 brush.rect.x += brush.rect.width;
21 }
23 brush.rect.width = textwidth(&brush.font, statustext) + labelheight(&brush.font);
24 brush.rect.x = barrect.x + barrect.width - brush.rect.width;
25 draw(dpy, &brush, False, statustext);
27 XCopyArea(dpy, brush.drawable, barwin, brush.gc, 0, 0, barrect.width,
28 barrect.height, 0, 0);
29 XFlush(dpy);
30 }