aewl

changeset 430:1e8aba00964e

no, reodering floating clients definately breaks the manage() policy which attaches all clients zoomed (otherwise higher-weight clients couldn't be attached zoomed, which sucks)
author Anselm R. Garbe <arg@10kloc.org>
date Wed, 06 Sep 2006 09:13:31 +0200
parents a31de8605f72
children a230e4432bb7
files client.c tag.c view.c
diffstat 3 files changed, 18 insertions(+), 16 deletions(-) [+]
line diff
     1.1 --- a/client.c	Tue Sep 05 19:26:34 2006 +0200
     1.2 +++ b/client.c	Wed Sep 06 09:13:31 2006 +0200
     1.3 @@ -247,8 +247,6 @@
     1.4  		c->isfloat = trans
     1.5  			|| (c->maxw && c->minw &&
     1.6  				c->maxw == c->minw && c->maxh == c->minh);
     1.7 -	if(c->isfloat)
     1.8 -		c->weight = ntags;
     1.9  
    1.10  	if(clients)
    1.11  		clients->prev = c;
     2.1 --- a/tag.c	Tue Sep 05 19:26:34 2006 +0200
     2.2 +++ b/tag.c	Wed Sep 06 09:13:31 2006 +0200
     2.3 @@ -106,8 +106,7 @@
     2.4  	if(!matched)
     2.5  		for(i = 0; i < ntags; i++)
     2.6  			c->tags[i] = seltag[i];
     2.7 -	if(!c->isfloat)
     2.8 -		for(c->weight = 0; c->weight < ntags && !c->tags[c->weight]; c->weight++);
     2.9 +	for(c->weight = 0; c->weight < ntags && !c->tags[c->weight]; c->weight++);
    2.10  }
    2.11  
    2.12  void
    2.13 @@ -121,8 +120,7 @@
    2.14  	for(i = 0; i < ntags; i++)
    2.15  		sel->tags[i] = False;
    2.16  	sel->tags[arg->i] = True;
    2.17 -	if(!sel->isfloat)
    2.18 -		sel->weight = arg->i;
    2.19 +	sel->weight = arg->i;
    2.20  	arrange(NULL);
    2.21  }
    2.22  
    2.23 @@ -138,7 +136,6 @@
    2.24  	for(i = 0; i < ntags && !sel->tags[i]; i++);
    2.25  	if(i == ntags)
    2.26  		sel->tags[arg->i] = True;
    2.27 -	if(!sel->isfloat)
    2.28 -		sel->weight = (i == ntags) ? arg->i : i;
    2.29 +	sel->weight = (i == ntags) ? arg->i : i;
    2.30  	arrange(NULL);
    2.31  }
     3.1 --- a/view.c	Tue Sep 05 19:26:34 2006 +0200
     3.2 +++ b/view.c	Wed Sep 06 09:13:31 2006 +0200
     3.3 @@ -38,6 +38,13 @@
     3.4  	clients = newclients;
     3.5  }
     3.6  
     3.7 +static Client *
     3.8 +nexttiled(Client *c)
     3.9 +{
    3.10 +	for(c = getnext(c->next); c && c->isfloat; c = getnext(c->next));
    3.11 +	return c;
    3.12 +}
    3.13 +
    3.14  /* extern */
    3.15  
    3.16  void (*arrange)(Arg *) = DEFMODE;
    3.17 @@ -82,8 +89,8 @@
    3.18  	maximized = False;
    3.19  
    3.20  	w = sw - mw;
    3.21 -	for(n = 0, c = clients; c && !c->isfloat; c = c->next)
    3.22 -		if(isvisible(c))
    3.23 +	for(n = 0, c = clients; c; c = c->next)
    3.24 +		if(isvisible(c) && !c->isfloat)
    3.25  			n++;
    3.26  
    3.27  	if(n > 1)
    3.28 @@ -186,8 +193,8 @@
    3.29  	unsigned int n;
    3.30  	Client *c;
    3.31  
    3.32 -	for(n = 0, c = clients; c && !c->isfloat; c = c->next)
    3.33 -		if(isvisible(c))
    3.34 +	for(n = 0, c = clients; c; c = c->next)
    3.35 +		if(isvisible(c) && !c->isfloat)
    3.36  			n++;
    3.37  	if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized)
    3.38  		return;
    3.39 @@ -311,14 +318,14 @@
    3.40  	unsigned int n;
    3.41  	Client *c;
    3.42  
    3.43 -	for(n = 0, c = clients; c && !c->isfloat; c = c->next)
    3.44 -		if(isvisible(c))
    3.45 +	for(n = 0, c = clients; c; c = c->next)
    3.46 +		if(isvisible(c) && !c->isfloat)
    3.47  			n++;
    3.48  	if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized)
    3.49  		return;
    3.50  
    3.51 -	if((c = sel) == getnext(clients))
    3.52 -		if(!(c = getnext(c->next)) || c->isfloat)
    3.53 +	if((c = sel) == nexttiled(clients))
    3.54 +		if(!(c = nexttiled(c)))
    3.55  			return;
    3.56  	detach(c);
    3.57  	c->next = clients;