comparison tag.c @ 441:785bad5f21dd

does this preserve z order for anthony?
author Anselm R. Garbe <arg@10kloc.org>
date Wed, 06 Sep 2006 15:30:28 +0200
parents 9d73c8298b2e
children 9d23330a5268
comparison
equal deleted inserted replaced
440:9d73c8298b2e 441:785bad5f21dd
108 XFree(ch.res_name); 108 XFree(ch.res_name);
109 } 109 }
110 if(!matched) 110 if(!matched)
111 for(i = 0; i < ntags; i++) 111 for(i = 0; i < ntags; i++)
112 c->tags[i] = seltag[i]; 112 c->tags[i] = seltag[i];
113 if(!c->isfloat) 113 for(c->weight = 0; c->weight < ntags && !c->tags[c->weight]; c->weight++);
114 for(c->weight = 0; c->weight < ntags && !c->tags[c->weight]; c->weight++);
115 } 114 }
116 115
117 void 116 void
118 tag(Arg *arg) 117 tag(Arg *arg)
119 { 118 {
123 return; 122 return;
124 123
125 for(i = 0; i < ntags; i++) 124 for(i = 0; i < ntags; i++)
126 sel->tags[i] = False; 125 sel->tags[i] = False;
127 sel->tags[arg->i] = True; 126 sel->tags[arg->i] = True;
128 if(!sel->isfloat) 127 sel->weight = arg->i;
129 sel->weight = arg->i;
130 arrange(NULL); 128 arrange(NULL);
131 } 129 }
132 130
133 void 131 void
134 toggletag(Arg *arg) 132 toggletag(Arg *arg)
140 138
141 sel->tags[arg->i] = !sel->tags[arg->i]; 139 sel->tags[arg->i] = !sel->tags[arg->i];
142 for(i = 0; i < ntags && !sel->tags[i]; i++); 140 for(i = 0; i < ntags && !sel->tags[i]; i++);
143 if(i == ntags) 141 if(i == ntags)
144 sel->tags[arg->i] = True; 142 sel->tags[arg->i] = True;
145 if(!sel->isfloat) 143 sel->weight = (i == ntags) ? arg->i : i;
146 sel->weight = (i == ntags) ? arg->i : i;
147 arrange(NULL); 144 arrange(NULL);
148 } 145 }