aewl

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 diff
     1.1 --- a/view.c	Wed Aug 30 13:00:30 2006 +0200
     1.2 +++ b/view.c	Thu Aug 31 08:48:04 2006 +0200
     1.3 @@ -67,7 +67,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  	else
    1.13  		XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
    1.14 @@ -130,7 +132,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);