aewl
changeset 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 |
files | client.c tag.c view.c |
diffstat | 3 files changed, 17 insertions(+), 19 deletions(-) [+] |
line diff
1.1 --- a/client.c Tue Sep 05 18:43:15 2006 +0200 1.2 +++ b/client.c Tue Sep 05 19:26:34 2006 +0200 1.3 @@ -247,6 +247,8 @@ 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 18:43:15 2006 +0200 2.2 +++ b/tag.c Tue Sep 05 19:26:34 2006 +0200 2.3 @@ -106,7 +106,8 @@ 2.4 if(!matched) 2.5 for(i = 0; i < ntags; i++) 2.6 c->tags[i] = seltag[i]; 2.7 - for(c->weight = 0; c->weight < ntags && !c->tags[c->weight]; c->weight++); 2.8 + if(!c->isfloat) 2.9 + for(c->weight = 0; c->weight < ntags && !c->tags[c->weight]; c->weight++); 2.10 } 2.11 2.12 void 2.13 @@ -120,7 +121,8 @@ 2.14 for(i = 0; i < ntags; i++) 2.15 sel->tags[i] = False; 2.16 sel->tags[arg->i] = True; 2.17 - sel->weight = arg->i; 2.18 + if(!sel->isfloat) 2.19 + sel->weight = arg->i; 2.20 arrange(NULL); 2.21 } 2.22 2.23 @@ -136,6 +138,7 @@ 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 - sel->weight = (i == ntags) ? arg->i : i; 2.28 + if(!sel->isfloat) 2.29 + sel->weight = (i == ntags) ? arg->i : i; 2.30 arrange(NULL); 2.31 }
3.1 --- a/view.c Tue Sep 05 18:43:15 2006 +0200 3.2 +++ b/view.c Tue Sep 05 19:26:34 2006 +0200 3.3 @@ -82,8 +82,8 @@ 3.4 maximized = False; 3.5 3.6 w = sw - mw; 3.7 - for(n = 0, c = clients; c; c = c->next) 3.8 - if(isvisible(c) && !c->isfloat) 3.9 + for(n = 0, c = clients; c && !c->isfloat; c = c->next) 3.10 + if(isvisible(c)) 3.11 n++; 3.12 3.13 if(n > 1) 3.14 @@ -186,8 +186,8 @@ 3.15 unsigned int n; 3.16 Client *c; 3.17 3.18 - for(n = 0, c = clients; c; c = c->next) 3.19 - if(isvisible(c) && !c->isfloat) 3.20 + for(n = 0, c = clients; c && !c->isfloat; c = c->next) 3.21 + if(isvisible(c)) 3.22 n++; 3.23 if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized) 3.24 return; 3.25 @@ -311,22 +311,15 @@ 3.26 unsigned int n; 3.27 Client *c; 3.28 3.29 - for(n = 0, c = clients; c; c = c->next) 3.30 - if(isvisible(c) && !c->isfloat) 3.31 + for(n = 0, c = clients; c && !c->isfloat; c = c->next) 3.32 + if(isvisible(c)) 3.33 n++; 3.34 if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized) 3.35 return; 3.36 3.37 - /* this is somewhat tricky, it asserts to only zoom tiled clients */ 3.38 - for(c = getnext(clients); c && c->isfloat; c = getnext(c->next)); 3.39 - if(c) { 3.40 - if(c == sel) 3.41 - for(c = getnext(c->next); c && c->isfloat; c = getnext(c->next)); 3.42 - else 3.43 - c = sel; 3.44 - } 3.45 - if(!c) 3.46 - return; 3.47 + if((c = sel) == getnext(clients)) 3.48 + if(!(c = getnext(c->next)) || c->isfloat) 3.49 + return; 3.50 detach(c); 3.51 c->next = clients; 3.52 clients->prev = c;