Hi,

The attached patch removes an unneccesary check in the enternotify()
function and removes about 4 lines. It might make it slightly less readable
maybe, but if you like it feel free to apply it :)

Kind regards,
Hiltjo Posthuma
diff -r 0d86faf4b05c dwm.c
--- a/dwm.c	Sun Jul 25 09:58:25 2010 +0100
+++ b/dwm.c	Mon Aug 23 18:08:54 2010 +0200
@@ -790,7 +790,6 @@
 
 void
 enternotify(XEvent *e) {
-	Client *c;
 	Monitor *m;
 	XCrossingEvent *ev = &e->xcrossing;
 
@@ -800,10 +799,7 @@
 		unfocus(selmon->sel, True);
 		selmon = m;
 	}
-	if((c = wintoclient(ev->window)))
-		focus(c);
-	else
-		focus(NULL);
+	focus(wintoclient(ev->window));
 }
 
 void

Reply via email to