about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--dwm.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/dwm.c b/dwm.c
index ada272c..05fbf58 100644
--- a/dwm.c
+++ b/dwm.c
@@ -551,8 +551,7 @@ drawsquare(Bool filled, Bool empty, Bool invert, ulong col[ColLast]) {
 
 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 @@ expose(XEvent *e) {
 
 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 @@ focus(Client *c) {
 		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 @@ updatebar(void) {
 
 void
 updategeom(void) {
-	int i;
 #ifdef XINERAMA
+	int i;
 	XineramaScreenInfo *info = NULL;
 
 	/* window area geometry */
#n154'>154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205