comparison tag.c @ 429:a31de8605f72

no, ordering floating clients at the end seems better
author Anselm R. Garbe <arg@10kloc.org>
date Tue, 05 Sep 2006 19:26:34 +0200
parents e689e540607a
children 1e8aba00964e
comparison
equal deleted inserted replaced
428:16f8f05f960e 429:a31de8605f72
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(c->weight = 0; c->weight < ntags && !c->tags[c->weight]; c->weight++); 109 if(!c->isfloat)
110 for(c->weight = 0; c->weight < ntags && !c->tags[c->weight]; c->weight++);
110 } 111 }
111 112
112 void 113 void
113 tag(Arg *arg) 114 tag(Arg *arg)
114 { 115 {
118 return; 119 return;
119 120
120 for(i = 0; i < ntags; i++) 121 for(i = 0; i < ntags; i++)
121 sel->tags[i] = False; 122 sel->tags[i] = False;
122 sel->tags[arg->i] = True; 123 sel->tags[arg->i] = True;
123 sel->weight = arg->i; 124 if(!sel->isfloat)
125 sel->weight = arg->i;
124 arrange(NULL); 126 arrange(NULL);
125 } 127 }
126 128
127 void 129 void
128 toggletag(Arg *arg) 130 toggletag(Arg *arg)
134 136
135 sel->tags[arg->i] = !sel->tags[arg->i]; 137 sel->tags[arg->i] = !sel->tags[arg->i];
136 for(i = 0; i < ntags && !sel->tags[i]; i++); 138 for(i = 0; i < ntags && !sel->tags[i]; i++);
137 if(i == ntags) 139 if(i == ntags)
138 sel->tags[arg->i] = True; 140 sel->tags[arg->i] = True;
139 sel->weight = (i == ntags) ? arg->i : i; 141 if(!sel->isfloat)
142 sel->weight = (i == ntags) ? arg->i : i;
140 arrange(NULL); 143 arrange(NULL);
141 } 144 }