Mercurial > aewl
comparison tag.c @ 381:b00cc483d13b
still something wrong with reorder()
author | Anselm R. Garbe <arg@10kloc.org> |
---|---|
date | Tue, 29 Aug 2006 13:40:09 +0200 |
parents | fc279cd6c7be |
children | 2ec9cead84a7 |
comparison
equal
deleted
inserted
replaced
380:4bf79305d675 | 381:b00cc483d13b |
---|---|
104 XFree(ch.res_name); | 104 XFree(ch.res_name); |
105 } | 105 } |
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 |
112 tag(Arg *arg) | 114 tag(Arg *arg) |
113 { | 115 { |
118 | 120 |
119 for(i = 0; i < ntags; i++) | 121 for(i = 0; i < ntags; i++) |
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 |
128 drawstatus(); | 128 drawstatus(); |
129 } | 129 } |
139 sel->tags[arg->i] = !sel->tags[arg->i]; | 139 sel->tags[arg->i] = !sel->tags[arg->i]; |
140 for(i = 0; i < ntags && !sel->tags[i]; i++); | 140 for(i = 0; i < ntags && !sel->tags[i]; i++); |
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 |
149 drawstatus(); | 147 drawstatus(); |
150 } | 148 } |