about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--draw.c6
-rw-r--r--dwm.h2
-rw-r--r--main.c7
3 files changed, 6 insertions, 9 deletions
diff --git a/draw.c b/draw.c
index fe2951c..178770b 100644
--- a/draw.c
+++ b/draw.c
@@ -114,17 +114,17 @@ drawstatus(void) {
 	drawtext(arrange == dofloat ? FLOATSYMBOL : TILESYMBOL, dc.norm, False, False);
 	x = dc.x + dc.w;
 	dc.w = textw(stext);
-	dc.x = bw - dc.w;
+	dc.x = sw - dc.w;
 	if(dc.x < x) {
 		dc.x = x;
-		dc.w = bw - x;
+		dc.w = sw - x;
 	}
 	drawtext(stext, dc.norm, False, False);
 	if((dc.w = dc.x - x) > bh) {
 		dc.x = x;
 		drawtext(sel ? sel->name : NULL, sel ? dc.sel : dc.norm, False, False);
 	}
-	XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, bw, bh, 0, 0);
+	XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, sw, bh, 0, 0);
 	XSync(dpy, False);
 }
 
diff --git a/dwm.h b/dwm.h
index 03f8c1f..171cb80 100644
--- a/dwm.h
+++ b/dwm.h
@@ -90,7 +90,7 @@ struct Client {
 
 extern const char *tags[];			/* all tags */
 extern char stext[256];				/* status text */
-extern int bx, by, bw, bh, bmw;			/* bar geometry, bar mode label width */
+extern int bh, bmw;				/* bar height, bar mode label width */
 extern int screen, sx, sy, sw, sh;		/* screen geometry */
 extern int wax, way, wah, waw;			/* windowarea geometry */
 extern unsigned int master, nmaster;		/* master percent, number of master clients */
diff --git a/main.c b/main.c
index ed055c2..5818838 100644
--- a/main.c
+++ b/main.c
@@ -19,7 +19,7 @@
 
 char stext[256];
 Bool *seltag;
-int bx, by, bw, bh, bmw, masterd, screen, sx, sy, sw, sh, wax, way, waw, wah;
+int bh, bmw, screen, sx, sy, sw, sh, wax, way, waw, wah;
 unsigned int master, nmaster, ntags, numlockmask;
 Atom wmatom[WMLast], netatom[NetLast];
 Bool running = True;
@@ -136,14 +136,11 @@ setup(void) {
 	nmaster = NMASTER;
 	bmw = textw(TILESYMBOL) > textw(FLOATSYMBOL) ? textw(TILESYMBOL) : textw(FLOATSYMBOL);
 	/* bar */
-	bx = sx;
-	by = sy;
-	bw = sw;
 	dc.h = bh = dc.font.height + 2;
 	wa.override_redirect = 1;
 	wa.background_pixmap = ParentRelative;
 	wa.event_mask = ButtonPressMask | ExposureMask;
-	barwin = XCreateWindow(dpy, root, bx, by, bw, bh, 0, DefaultDepth(dpy, screen),
+	barwin = XCreateWindow(dpy, root, sx, sy, sw, bh, 0, DefaultDepth(dpy, screen),
 			CopyFromParent, DefaultVisual(dpy, screen),
 			CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
 	XDefineCursor(dpy, barwin, cursor[CurNormal]);
n215' href='#n215'>215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270