X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=tag.c;h=a6db1d549c8b8551a868fe22d8a7f28cf568e7c4;hb=8a5f002c4182abf6dcaac354a3da04cc18830ad9;hp=ef9cb0889300657441809adf32b17c5ae08ef917;hpb=cb4aa5bc35cf16a06bb2b4e880648e390fa2cc55;p=dwm.git diff --git a/tag.c b/tag.c index ef9cb08..a6db1d5 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" @@ -31,18 +31,6 @@ static unsigned int len = 0; /* extern */ -Client * -getnext(Client *c) { - for(; c && !isvisible(c); c = c->next); - return c; -} - -Client * -getprev(Client *c) { - for(; c && !isvisible(c); c = c->prev); - return c; -} - void initrregs(void) { unsigned int i; @@ -76,13 +64,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);