summaryrefslogtreecommitdiffstats
path: root/tag.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tag.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/tag.c b/tag.c
index b0c4d14..fafc2c5 100644
--- a/tag.c
+++ b/tag.c
@@ -110,8 +110,7 @@ settags(Client *c, Client *trans)
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
117void 116void
@@ -125,8 +124,7 @@ tag(Arg *arg)
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
@@ -142,7 +140,6 @@ toggletag(Arg *arg)
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}