X-Git-Url: https://git.xinqibao.xyz/dwm.git/blobdiff_plain/6b25d06d7d159bf89d740847fedc876ab0137b6b..321e8d51edb8fe433e8e2ce8d5463c6999cc0576:/tag.c?ds=inline diff --git a/tag.c b/tag.c index eda1543..fd08853 100644 --- a/tag.c +++ b/tag.c @@ -1,5 +1,4 @@ -/* - * (C)opyright MMVI Anselm R. Garbe +/* (C)opyright MMVI Anselm R. Garbe * 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(); }