JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
fififif
[dwm.git] / tag.c
diff --git a/tag.c b/tag.c
index eda1543..fd08853 100644 (file)
--- a/tag.c
+++ b/tag.c
@@ -1,5 +1,4 @@
-/*
- * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
+/* (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
  * See LICENSE file for license details.
  */
 #include "dwm.h"
@@ -53,7 +52,6 @@ initrregs(void) {
                return;
        len = sizeof(rule) / sizeof(rule[0]);
        rreg = emallocz(len * sizeof(RReg));
-
        for(i = 0; i < len; i++) {
                if(rule[i].clpattern) {
                        reg = emallocz(sizeof(regex_t));
@@ -106,7 +104,6 @@ settags(Client *c, Client *trans) {
        if(!matched)
                for(i = 0; i < ntags; i++)
                        c->tags[i] = seltag[i];
-       for(c->weight = 0; c->weight < ntags && !c->tags[c->weight]; c->weight++);
 }
 
 void
@@ -115,12 +112,10 @@ tag(Arg *arg) {
 
        if(!sel)
                return;
-
        for(i = 0; i < ntags; i++)
                sel->tags[i] = False;
        sel->tags[arg->i] = True;
-       sel->weight = arg->i;
-       arrange(NULL);
+       arrange();
 }
 
 void
@@ -129,11 +124,9 @@ toggletag(Arg *arg) {
 
        if(!sel)
                return;
-
        sel->tags[arg->i] = !sel->tags[arg->i];
        for(i = 0; i < ntags && !sel->tags[i]; i++);
        if(i == ntags)
                sel->tags[arg->i] = True;
-       sel->weight = (i == ntags) ? arg->i : i;
-       arrange(NULL);
+       arrange();
 }