dwm-meillo

diff tag.c @ 289:6562340b9ffc

applied viewsel.patch
author Anselm R.Garbe <arg@10ksloc.org>
date Mon, 14 Aug 2006 18:46:07 +0200
parents 5e5e5392c7cb
children 71f02d14dce1
line diff
     1.1 --- a/tag.c	Mon Aug 14 18:14:08 2006 +0200
     1.2 +++ b/tag.c	Mon Aug 14 18:46:07 2006 +0200
     1.3 @@ -47,7 +47,9 @@
     1.4  		else
     1.5  			ban(c);
     1.6  	}
     1.7 -	if((sel = getnext(clients))) {
     1.8 +	if(!sel || !isvisible(sel))
     1.9 +		sel = getnext(clients);
    1.10 +	if(sel) {
    1.11  		focus(sel);
    1.12  		restack();
    1.13  	}
    1.14 @@ -111,7 +113,9 @@
    1.15  		else
    1.16  			ban(c);
    1.17  	}
    1.18 -	if((sel = getnext(clients)))
    1.19 +	if(!sel || !isvisible(sel))
    1.20 +		sel = getnext(clients);
    1.21 +	if(sel)
    1.22  		focus(sel);
    1.23  	else
    1.24  		XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);