diff options
| author | Anselm R. Garbe <arg@10kloc.org> | 2006-09-06 09:13:31 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <arg@10kloc.org> | 2006-09-06 09:13:31 +0200 |
| commit | 0915da8842fd6e16b804ae3205ec2f6baaaa342c (patch) | |
| tree | ff38b5bb49f0bf9d1ddf0298b95fe65ba7709914 | |
| parent | no, ordering floating clients at the end seems better (diff) | |
| download | dwm-0915da8842fd6e16b804ae3205ec2f6baaaa342c.tar.gz dwm-0915da8842fd6e16b804ae3205ec2f6baaaa342c.zip | |
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)
| -rw-r--r-- | client.c | 2 | ||||
| -rw-r--r-- | tag.c | 9 | ||||
| -rw-r--r-- | view.c | 23 |
3 files changed, 18 insertions, 16 deletions
| @@ -247,8 +247,6 @@ manage(Window w, XWindowAttributes *wa) | |||
| 247 | c->isfloat = trans | 247 | c->isfloat = trans |
| 248 | || (c->maxw && c->minw && | 248 | || (c->maxw && c->minw && |
| 249 | c->maxw == c->minw && c->maxh == c->minh); | 249 | c->maxw == c->minw && c->maxh == c->minh); |
| 250 | if(c->isfloat) | ||
| 251 | c->weight = ntags; | ||
| 252 | 250 | ||
| 253 | if(clients) | 251 | if(clients) |
| 254 | clients->prev = c; | 252 | clients->prev = c; |
| @@ -106,8 +106,7 @@ settags(Client *c) | |||
| 106 | if(!matched) | 106 | if(!matched) |
| 107 | for(i = 0; i < ntags; i++) | 107 | for(i = 0; i < ntags; i++) |
| 108 | c->tags[i] = seltag[i]; | 108 | c->tags[i] = seltag[i]; |
| 109 | if(!c->isfloat) | 109 | for(c->weight = 0; c->weight < ntags && !c->tags[c->weight]; c->weight++); |
| 110 | for(c->weight = 0; c->weight < ntags && !c->tags[c->weight]; c->weight++); | ||
| 111 | } | 110 | } |
| 112 | 111 | ||
| 113 | void | 112 | void |
| @@ -121,8 +120,7 @@ tag(Arg *arg) | |||
| 121 | for(i = 0; i < ntags; i++) | 120 | for(i = 0; i < ntags; i++) |
| 122 | sel->tags[i] = False; | 121 | sel->tags[i] = False; |
| 123 | sel->tags[arg->i] = True; | 122 | sel->tags[arg->i] = True; |
| 124 | if(!sel->isfloat) | 123 | sel->weight = arg->i; |
| 125 | sel->weight = arg->i; | ||
| 126 | arrange(NULL); | 124 | arrange(NULL); |
| 127 | } | 125 | } |
| 128 | 126 | ||
| @@ -138,7 +136,6 @@ toggletag(Arg *arg) | |||
| 138 | for(i = 0; i < ntags && !sel->tags[i]; i++); | 136 | for(i = 0; i < ntags && !sel->tags[i]; i++); |
| 139 | if(i == ntags) | 137 | if(i == ntags) |
| 140 | sel->tags[arg->i] = True; | 138 | sel->tags[arg->i] = True; |
| 141 | if(!sel->isfloat) | 139 | sel->weight = (i == ntags) ? arg->i : i; |
| 142 | sel->weight = (i == ntags) ? arg->i : i; | ||
| 143 | arrange(NULL); | 140 | arrange(NULL); |
| 144 | } | 141 | } |
| @@ -38,6 +38,13 @@ reorder() | |||
| 38 | clients = newclients; | 38 | clients = newclients; |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | static Client * | ||
| 42 | nexttiled(Client *c) | ||
| 43 | { | ||
| 44 | for(c = getnext(c->next); c && c->isfloat; c = getnext(c->next)); | ||
| 45 | return c; | ||
| 46 | } | ||
| 47 | |||
| 41 | /* extern */ | 48 | /* extern */ |
| 42 | 49 | ||
| 43 | void (*arrange)(Arg *) = DEFMODE; | 50 | void (*arrange)(Arg *) = DEFMODE; |
| @@ -82,8 +89,8 @@ dotile(Arg *arg) | |||
| 82 | maximized = False; | 89 | maximized = False; |
| 83 | 90 | ||
| 84 | w = sw - mw; | 91 | w = sw - mw; |
| 85 | for(n = 0, c = clients; c && !c->isfloat; c = c->next) | 92 | for(n = 0, c = clients; c; c = c->next) |
| 86 | if(isvisible(c)) | 93 | if(isvisible(c) && !c->isfloat) |
| 87 | n++; | 94 | n++; |
| 88 | 95 | ||
| 89 | if(n > 1) | 96 | if(n > 1) |
| @@ -186,8 +193,8 @@ resizecol(Arg *arg) | |||
| 186 | unsigned int n; | 193 | unsigned int n; |
| 187 | Client *c; | 194 | Client *c; |
| 188 | 195 | ||
| 189 | for(n = 0, c = clients; c && !c->isfloat; c = c->next) | 196 | for(n = 0, c = clients; c; c = c->next) |
| 190 | if(isvisible(c)) | 197 | if(isvisible(c) && !c->isfloat) |
| 191 | n++; | 198 | n++; |
| 192 | if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized) | 199 | if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized) |
| 193 | return; | 200 | return; |
| @@ -311,14 +318,14 @@ zoom(Arg *arg) | |||
| 311 | unsigned int n; | 318 | unsigned int n; |
| 312 | Client *c; | 319 | Client *c; |
| 313 | 320 | ||
| 314 | for(n = 0, c = clients; c && !c->isfloat; c = c->next) | 321 | for(n = 0, c = clients; c; c = c->next) |
| 315 | if(isvisible(c)) | 322 | if(isvisible(c) && !c->isfloat) |
| 316 | n++; | 323 | n++; |
| 317 | if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized) | 324 | if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized) |
| 318 | return; | 325 | return; |
| 319 | 326 | ||
| 320 | if((c = sel) == getnext(clients)) | 327 | if((c = sel) == nexttiled(clients)) |
| 321 | if(!(c = getnext(c->next)) || c->isfloat) | 328 | if(!(c = nexttiled(c))) |
| 322 | return; | 329 | return; |
| 323 | detach(c); | 330 | detach(c); |
| 324 | c->next = clients; | 331 | c->next = clients; |
