X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=tag.c;h=f9aef0b17f740b9a6d88546d3b8d89d9ecc89030;hb=0d095ae2ff0e8d703e4a8c9a20cd061c4bdcc6e2;hp=2a06bc99865db3b912884aef47e73a42584a0b5c;hpb=ac24f132dba7e59d9d9ff98d984f5e0b0d20fd09;p=dwm.git diff --git a/tag.c b/tag.c index 2a06bc9..f9aef0b 100644 --- a/tag.c +++ b/tag.c @@ -76,13 +76,13 @@ settags(Client *c, Client *trans) { unsigned int i, j; regmatch_t tmp; Bool matched = trans != NULL; - XClassHint ch; + XClassHint ch = { 0 }; - if(matched) { + if(matched) for(i = 0; i < ntags; i++) c->tags[i] = trans->tags[i]; - } - else if(XGetClassHint(dpy, c->win, &ch)) { + else { + 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);