changeset 289:6562340b9ffc

applied viewsel.patch
author Anselm R.Garbe <arg@10ksloc.org>
date Mon, 14 Aug 2006 18:46:07 +0200 (2006-08-14)
parents b7865e6feef2
children 5c3b8c5286f5
files tag.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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);