summaryrefslogtreecommitdiffstats
path: root/tag.c
diff options
context:
space:
mode:
Diffstat (limited to 'tag.c')
-rw-r--r--tag.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tag.c b/tag.c
index 7bc4da0..a2e1c89 100644
--- a/tag.c
+++ b/tag.c
@@ -106,6 +106,8 @@ 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 for(i = 0; i < ntags && !c->tags[i]; i++);
110 c->weight = i;
109} 111}
110 112
111void 113void
@@ -120,8 +122,6 @@ tag(Arg *arg)
120 sel->tags[i] = False; 122 sel->tags[i] = False;
121 sel->tags[arg->i] = True; 123 sel->tags[arg->i] = True;
122 settitle(sel); 124 settitle(sel);
123 detach(sel);
124 attach(sel);
125 if(!isvisible(sel)) 125 if(!isvisible(sel))
126 arrange(NULL); 126 arrange(NULL);
127 else 127 else
@@ -141,8 +141,6 @@ toggletag(Arg *arg)
141 if(i == ntags) 141 if(i == ntags)
142 sel->tags[arg->i] = True; 142 sel->tags[arg->i] = True;
143 settitle(sel); 143 settitle(sel);
144 detach(sel);
145 attach(sel);
146 if(!isvisible(sel)) 144 if(!isvisible(sel))
147 arrange(NULL); 145 arrange(NULL);
148 else 146 else