diff options
| author | Anselm R. Garbe <arg@10kloc.org> | 2006-08-29 13:40:09 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <arg@10kloc.org> | 2006-08-29 13:40:09 +0200 |
| commit | 9d739090750ffb3b3a64e86e2331215b8901c360 (patch) | |
| tree | 6670ab450bf962433c148a6ff30107a411b6fb27 /tag.c | |
| parent | this algorithm seems to keep order for any scenario (diff) | |
| download | dwm-9d739090750ffb3b3a64e86e2331215b8901c360.tar.gz dwm-9d739090750ffb3b3a64e86e2331215b8901c360.zip | |
still something wrong with reorder()
Diffstat (limited to '')
| -rw-r--r-- | tag.c | 6 |
1 files changed, 2 insertions, 4 deletions
| @@ -106,6 +106,8 @@ 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 | for(i = 0; i < ntags && !c->tags[i]; i++); | ||
| 110 | c->weight = i; | ||
| 109 | } | 111 | } |
| 110 | 112 | ||
| 111 | void | 113 | void |
| @@ -120,8 +122,6 @@ tag(Arg *arg) | |||
| 120 | sel->tags[i] = False; | 122 | sel->tags[i] = False; |
| 121 | sel->tags[arg->i] = True; | 123 | sel->tags[arg->i] = True; |
| 122 | settitle(sel); | 124 | settitle(sel); |
| 123 | detach(sel); | ||
| 124 | attach(sel); | ||
| 125 | if(!isvisible(sel)) | 125 | if(!isvisible(sel)) |
| 126 | arrange(NULL); | 126 | arrange(NULL); |
| 127 | else | 127 | else |
| @@ -141,8 +141,6 @@ toggletag(Arg *arg) | |||
| 141 | if(i == ntags) | 141 | if(i == ntags) |
| 142 | sel->tags[arg->i] = True; | 142 | sel->tags[arg->i] = True; |
| 143 | settitle(sel); | 143 | settitle(sel); |
| 144 | detach(sel); | ||
| 145 | attach(sel); | ||
| 146 | if(!isvisible(sel)) | 144 | if(!isvisible(sel)) |
| 147 | arrange(NULL); | 145 | arrange(NULL); |
| 148 | else | 146 | else |
