wm.c
changeset 21 3ef108a5ca0a
parent 16 359b6e563b95
child 26 e8f627998d6f
--- a/wm.c	Tue Jul 11 22:49:09 2006 +0200
+++ b/wm.c	Tue Jul 11 23:18:30 2006 +0200
@@ -245,10 +245,6 @@
 
 	update_keys();
 
-	brush.drawable = XCreatePixmap(dpy, root, rect.width, rect.height,
-			DefaultDepth(dpy, screen));
-	brush.gc = XCreateGC(dpy, root, 0, 0);
-
 	/* style */
 	loadcolors(dpy, screen, &brush, BGCOLOR, FGCOLOR, BORDERCOLOR);
 	loadfont(dpy, &brush.font, FONT);
@@ -266,6 +262,11 @@
 			CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
 	XDefineCursor(dpy, barwin, cursor[CurNormal]);
 	XMapRaised(dpy, barwin);
+
+	brush.drawable = XCreatePixmap(dpy, root, rect.width, barrect.height,
+			DefaultDepth(dpy, screen));
+	brush.gc = XCreateGC(dpy, root, 0, 0);
+
 	pipe_spawn(statustext, sizeof(statustext), dpy, (char **)status);
 	draw_bar();