wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit fe0f4413e4aed87c5ac638f4c2b136e7f60c0c0f
parent 39085f5b678b1678cf1ff1107db6e10ab89625bd
Author: Anselm R. Garbe <garbeam@wmii.de>
Date:   Thu, 13 Apr 2006 14:38:29 +0200

fixed match_rules


Diffstat:
cmd/wm/rule.c | 13+++----------
1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/cmd/wm/rule.c b/cmd/wm/rule.c @@ -138,17 +138,10 @@ match(Client *c, const char *prop) if(r->is_valid && !regexec(&r->regex, prop, 1, &tmpregm, 0)) { if(!strncmp(r->tags, "~", 2)) c->floating = True; - else if(!c->view.size || !strncmp(c->tags, "nil", 4)) { + else if(!strlen(c->tags) || !strncmp(c->tags, "nil", 4)) { if(!strncmp(r->tags, "!", 2)) { - if(view.size) { - c->tags[0] = 0; - unsigned int j; - for(j = 0; j < c->view.size; j++) { - cext_strlcat(c->tags, c->view.data[j]->name, sizeof(c->tags)); - if(j + 1 < c->view.size) - cext_strlcat(c->tags, "+", sizeof(c->tags)); - } - } + if(view.size) + cext_strlcpy(c->tags, view.data[sel]->name, sizeof(c->tags)); else cext_strlcpy(c->tags, "nil", sizeof(c->tags)); }