aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnselm R Garbe <garbeam@gmail.com>2008-08-29 11:29:42 +0100
committerAnselm R Garbe <garbeam@gmail.com>2008-08-29 11:29:42 +0100
commitaddc52c9485f63a71f3afa54631f3b56b6bf2225 (patch)
tree9156704109f2bd2b2e153a95f37b54728cf6daa7
parent26f41c905529c6df908980c731077fa340a9e1c8 (diff)
downloaddwm-addc52c9485f63a71f3afa54631f3b56b6bf2225.tar.gz
fixed
-rw-r--r--dwm.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/dwm.c b/dwm.c
index d7d8bff..2a4bacc 100644
--- a/dwm.c
+++ b/dwm.c
@@ -250,21 +250,21 @@ applyrules(Client *c) {
XClassHint ch = { 0 };
/* rule matching */
- if(XGetClassHint(dpy, c->win, &ch) == 0)
- return;
- for(i = 0; i < LENGTH(rules); i++) {
- r = &rules[i];
- if((!r->title || strstr(c->name, r->title))
- && (!r->class || (ch.res_class && strstr(ch.res_class, r->class)))
- && (!r->instance || (ch.res_name && strstr(ch.res_name, r->instance)))) {
- c->isfloating = r->isfloating;
- c->tags |= r->tags & TAGMASK;
+ if(XGetClassHint(dpy, c->win, &ch)) {
+ for(i = 0; i < LENGTH(rules); i++) {
+ r = &rules[i];
+ if((!r->title || strstr(c->name, r->title))
+ && (!r->class || (ch.res_class && strstr(ch.res_class, r->class)))
+ && (!r->instance || (ch.res_name && strstr(ch.res_name, r->instance)))) {
+ c->isfloating = r->isfloating;
+ c->tags |= r->tags & TAGMASK;
+ }
}
+ if(ch.res_class)
+ XFree(ch.res_class);
+ if(ch.res_name)
+ XFree(ch.res_name);
}
- if(ch.res_class)
- XFree(ch.res_class);
- if(ch.res_name)
- XFree(ch.res_name);
if(!c->tags)
c->tags = tagset[seltags];
}