X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;ds=sidebyside;f=tag.c;h=a2e1c8994d1ba5987a738c7a028769789347be19;hb=9d739090750ffb3b3a64e86e2331215b8901c360;hp=512f355fb315588148e6c59ce498b1f1157bec6a;hpb=d6a6eca71d760fb3b61e35b187b9b9fd51092c71;p=dwm.git diff --git a/tag.c b/tag.c index 512f355..a2e1c89 100644 --- a/tag.c +++ b/tag.c @@ -106,6 +106,8 @@ settags(Client *c) if(!matched) for(i = 0; i < ntags; i++) c->tags[i] = seltag[i]; + for(i = 0; i < ntags && !c->tags[i]; i++); + c->weight = i; } void @@ -122,6 +124,8 @@ tag(Arg *arg) settitle(sel); if(!isvisible(sel)) arrange(NULL); + else + drawstatus(); } void @@ -139,4 +143,6 @@ toggletag(Arg *arg) settitle(sel); if(!isvisible(sel)) arrange(NULL); + else + drawstatus(); }