X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=tag.c;h=f9aef0b17f740b9a6d88546d3b8d89d9ecc89030;hb=e256afe31ef6a70eceb632ddfe717bfe6d8d9169;hp=ef9cb0889300657441809adf32b17c5ae08ef917;hpb=cb4aa5bc35cf16a06bb2b4e880648e390fa2cc55;p=dwm.git diff --git a/tag.c b/tag.c index ef9cb08..f9aef0b 100644 --- a/tag.c +++ b/tag.c @@ -1,4 +1,4 @@ -/* (C)opyright MMVII Anselm R. Garbe +/* (C)opyright MMVI-MMVII Anselm R. Garbe * See LICENSE file for license details. */ #include "dwm.h" @@ -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);