applied viewsel.patch
authorAnselm R.Garbe <arg@10ksloc.org>
Mon, 14 Aug 2006 18:46:07 +0200
changeset 289 6562340b9ffc
parent 288 b7865e6feef2
child 290 5c3b8c5286f5
applied viewsel.patch
tag.c
--- a/tag.c	Mon Aug 14 18:14:08 2006 +0200
+++ b/tag.c	Mon Aug 14 18:46:07 2006 +0200
@@ -47,7 +47,9 @@
 		else
 			ban(c);
 	}
-	if((sel = getnext(clients))) {
+	if(!sel || !isvisible(sel))
+		sel = getnext(clients);
+	if(sel) {
 		focus(sel);
 		restack();
 	}
@@ -111,7 +113,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);