dwm.c
changeset 1136 19de7b521826
parent 1135 a3be6b8a792d
child 1141 fa19c918d250
--- a/dwm.c	Thu Mar 13 10:11:02 2008 +0000
+++ b/dwm.c	Thu Mar 13 10:19:05 2008 +0000
@@ -178,6 +178,7 @@
 void unban(Client *c);
 void unmanage(Client *c);
 void unmapnotify(XEvent *e);
+void updatebarpos(void);
 void updatesizehints(Client *c);
 void updatetitle(Client *c);
 void updatewmhints(Client *c);
@@ -1415,10 +1416,7 @@
 	mow = ww;
 	moh = wh;
 
-	if(dc.drawable != 0)
-		XFreePixmap(dpy, dc.drawable);
-	dc.drawable = XCreatePixmap(dpy, root, bw, bh, DefaultDepth(dpy, screen));
-	XMoveResizeWindow(dpy, barwin, bx, by, bw, bh);
+	updatebarpos();
 }
 
 void
@@ -1743,6 +1741,15 @@
 }
 
 void
+updatebarpos(void) {
+
+	if(dc.drawable != 0)
+		XFreePixmap(dpy, dc.drawable);
+	dc.drawable = XCreatePixmap(dpy, root, bw, bh, DefaultDepth(dpy, screen));
+	XMoveResizeWindow(dpy, barwin, bx, by, bw, bh);
+}
+
+void
 updatesizehints(Client *c) {
 	long msize;
 	XSizeHints size;