summaryrefslogtreecommitdiffstats
path: root/tag.c
diff options
context:
space:
mode:
Diffstat (limited to 'tag.c')
-rw-r--r--tag.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tag.c b/tag.c
index fafc2c5..b0c4d14 100644
--- a/tag.c
+++ b/tag.c
@@ -110,7 +110,8 @@ 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 for(c->weight = 0; c->weight < ntags && !c->tags[c->weight]; c->weight++); 113 if(!c->isfloat)
114 for(c->weight = 0; c->weight < ntags && !c->tags[c->weight]; c->weight++);
114} 115}
115 116
116void 117void
@@ -124,7 +125,8 @@ tag(Arg *arg)
124 for(i = 0; i < ntags; i++) 125 for(i = 0; i < ntags; i++)
125 sel->tags[i] = False; 126 sel->tags[i] = False;
126 sel->tags[arg->i] = True; 127 sel->tags[arg->i] = True;
127 sel->weight = arg->i; 128 if(!sel->isfloat)
129 sel->weight = arg->i;
128 arrange(NULL); 130 arrange(NULL);
129} 131}
130 132
@@ -140,6 +142,7 @@ toggletag(Arg *arg)
140 for(i = 0; i < ntags && !sel->tags[i]; i++); 142 for(i = 0; i < ntags && !sel->tags[i]; i++);
141 if(i == ntags) 143 if(i == ntags)
142 sel->tags[arg->i] = True; 144 sel->tags[arg->i] = True;
143 sel->weight = (i == ntags) ? arg->i : i; 145 if(!sel->isfloat)
146 sel->weight = (i == ntags) ? arg->i : i;
144 arrange(NULL); 147 arrange(NULL);
145} 148}