aewl

diff view.c @ 429:a31de8605f72

no, ordering floating clients at the end seems better
author Anselm R. Garbe <arg@10kloc.org>
date Tue, 05 Sep 2006 19:26:34 +0200
parents 16f8f05f960e
children 1e8aba00964e
line diff
     1.1 --- a/view.c	Tue Sep 05 18:43:15 2006 +0200
     1.2 +++ b/view.c	Tue Sep 05 19:26:34 2006 +0200
     1.3 @@ -82,8 +82,8 @@
     1.4  	maximized = False;
     1.5  
     1.6  	w = sw - mw;
     1.7 -	for(n = 0, c = clients; c; c = c->next)
     1.8 -		if(isvisible(c) && !c->isfloat)
     1.9 +	for(n = 0, c = clients; c && !c->isfloat; c = c->next)
    1.10 +		if(isvisible(c))
    1.11  			n++;
    1.12  
    1.13  	if(n > 1)
    1.14 @@ -186,8 +186,8 @@
    1.15  	unsigned int n;
    1.16  	Client *c;
    1.17  
    1.18 -	for(n = 0, c = clients; c; c = c->next)
    1.19 -		if(isvisible(c) && !c->isfloat)
    1.20 +	for(n = 0, c = clients; c && !c->isfloat; c = c->next)
    1.21 +		if(isvisible(c))
    1.22  			n++;
    1.23  	if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized)
    1.24  		return;
    1.25 @@ -311,22 +311,15 @@
    1.26  	unsigned int n;
    1.27  	Client *c;
    1.28  
    1.29 -	for(n = 0, c = clients; c; c = c->next)
    1.30 -		if(isvisible(c) && !c->isfloat)
    1.31 +	for(n = 0, c = clients; c && !c->isfloat; c = c->next)
    1.32 +		if(isvisible(c))
    1.33  			n++;
    1.34  	if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized)
    1.35  		return;
    1.36  
    1.37 -	/* this is somewhat tricky, it asserts to only zoom tiled clients */
    1.38 -	for(c = getnext(clients); c && c->isfloat; c = getnext(c->next));
    1.39 -	if(c) {
    1.40 -		if(c == sel)
    1.41 -			for(c = getnext(c->next); c && c->isfloat; c = getnext(c->next));
    1.42 -		else
    1.43 -			c = sel;
    1.44 -	}
    1.45 -	if(!c)
    1.46 -		return;
    1.47 +	if((c = sel) == getnext(clients))
    1.48 +		if(!(c = getnext(c->next)) || c->isfloat)
    1.49 +			return;
    1.50  	detach(c);
    1.51  	c->next = clients;
    1.52  	clients->prev = c;