diff view.c @ 393:6786cd59468f

applied sanders patch to remove unnecessary commit()
author Anselm R. Garbe <arg@10kloc.org>
date Thu, 31 Aug 2006 08:48:04 +0200
parents aba385c61b3b
children 7528080beb0e
line wrap: on
line diff
--- a/view.c	Wed Aug 30 13:00:30 2006 +0200
+++ b/view.c	Thu Aug 31 08:48:04 2006 +0200
@@ -67,7 +67,9 @@
 		else
 			ban(c);
 	}
-	if((sel = getnext(clients)))
+	if(!sel || !isvisible(sel))
+		sel = getnext(clients);
+	if(sel)
 		focus(sel);
 	else
 		XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
@@ -130,7 +132,9 @@
 		else
 			ban(c);
 	}
-	if((sel = getnext(clients)))
+	if(!sel || !isvisible(sel))
+		sel = getnext(clients);
+	if(sel)
 		focus(sel);
 	else
 		XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);