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 48abc26..9e997f9 100644
--- a/tag.c
+++ b/tag.c
@@ -106,8 +106,7 @@ settags(Client *c)
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 if(!c->isfloat) 109 for(c->weight = 0; c->weight < ntags && !c->tags[c->weight]; c->weight++);
110 for(c->weight = 0; c->weight < ntags && !c->tags[c->weight]; c->weight++);
111} 110}
112 111
113void 112void
@@ -121,8 +120,7 @@ tag(Arg *arg)
121 for(i = 0; i < ntags; i++) 120 for(i = 0; i < ntags; i++)
122 sel->tags[i] = False; 121 sel->tags[i] = False;
123 sel->tags[arg->i] = True; 122 sel->tags[arg->i] = True;
124 if(!sel->isfloat) 123 sel->weight = arg->i;
125 sel->weight = arg->i;
126 arrange(NULL); 124 arrange(NULL);
127} 125}
128 126
@@ -138,7 +136,6 @@ toggletag(Arg *arg)
138 for(i = 0; i < ntags && !sel->tags[i]; i++); 136 for(i = 0; i < ntags && !sel->tags[i]; i++);
139 if(i == ntags) 137 if(i == ntags)
140 sel->tags[arg->i] = True; 138 sel->tags[arg->i] = True;
141 if(!sel->isfloat) 139 sel->weight = (i == ntags) ? arg->i : i;
142 sel->weight = (i == ntags) ? arg->i : i;
143 arrange(NULL); 140 arrange(NULL);
144} 141}