equal
deleted
inserted
replaced
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 } |