dwm.c
changeset 1254 d04ee4e2336d
parent 1253 81b40dd1b766
child 1255 c4152a0199c8
--- a/dwm.c	Mon Jun 02 12:19:02 2008 +0200
+++ b/dwm.c	Wed Jun 04 11:49:46 2008 +0200
@@ -551,8 +551,7 @@
 
 void
 drawtext(const char *text, ulong col[ColLast], Bool invert) {
-	int i, x, y, h;
-	uint len, olen;
+	int i, x, y, h, len, olen;
 	XRectangle r = { dc.x, dc.y, dc.w, dc.h };
 	char buf[256];
 
@@ -612,7 +611,7 @@
 
 void
 focus(Client *c) {
-	if(!c || (c && c->isbanned))
+	if(!c || c->isbanned)
 		for(c = stack; c && c->isbanned; c = c->snext);
 	if(sel && sel != c) {
 		grabbuttons(sel, False);
@@ -622,14 +621,12 @@
 		detachstack(c);
 		attachstack(c);
 		grabbuttons(c, True);
-	}
-	sel = c;
-	if(c) {
 		XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]);
 		XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
 	}
 	else
 		XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
+	sel = c;
 	drawbar();
 }
 
@@ -1565,8 +1562,8 @@
 
 void
 updategeom(void) {
+#ifdef XINERAMA
 	int i;
-#ifdef XINERAMA
 	XineramaScreenInfo *info = NULL;
 
 	/* window area geometry */