X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=tag.c;h=b0c4d142d954f8d15dd5544b3bab0e62cc713117;hb=e8389a4cc0f1c35bcb7e7646102bd6d6a830207e;hp=48abc2632b2be1d50d07cfe1dfabc8e7ae1961a1;hpb=0d0e8bde134b999dd22c891d227d886ca6c9ba2c;p=dwm.git diff --git a/tag.c b/tag.c index 48abc26..b0c4d14 100644 --- a/tag.c +++ b/tag.c @@ -76,15 +76,19 @@ initrregs() } void -settags(Client *c) +settags(Client *c, Client *trans) { char prop[512]; unsigned int i, j; regmatch_t tmp; - Bool matched = False; + Bool matched = trans != NULL; XClassHint ch; - if(XGetClassHint(dpy, c->win, &ch)) { + if(matched) { + for(i = 0; i < ntags; i++) + c->tags[i] = trans->tags[i]; + } + else if(XGetClassHint(dpy, c->win, &ch)) { snprintf(prop, sizeof(prop), "%s:%s:%s", ch.res_class ? ch.res_class : "", ch.res_name ? ch.res_name : "", c->name);