summaryrefslogtreecommitdiffstats
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
parentchecking result of XGetClassHint, removed some obsolete lines in initfont() (diff)
downloaddwm-addc52c9485f63a71f3afa54631f3b56b6bf2225.tar.gz
dwm-addc52c9485f63a71f3afa54631f3b56b6bf2225.zip
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) {
250 XClassHint ch = { 0 }; 250 XClassHint ch = { 0 };
251 251
252 /* rule matching */ 252 /* rule matching */
253 if(XGetClassHint(dpy, c->win, &ch) == 0) 253 if(XGetClassHint(dpy, c->win, &ch)) {
254 return; 254 for(i = 0; i < LENGTH(rules); i++) {
255 for(i = 0; i < LENGTH(rules); i++) { 255 r = &rules[i];
256 r = &rules[i]; 256 if((!r->title || strstr(c->name, r->title))
257 if((!r->title || strstr(c->name, r->title)) 257 && (!r->class || (ch.res_class && strstr(ch.res_class, r->class)))
258 && (!r->class || (ch.res_class && strstr(ch.res_class, r->class))) 258 && (!r->instance || (ch.res_name && strstr(ch.res_name, r->instance)))) {
259 && (!r->instance || (ch.res_name && strstr(ch.res_name, r->instance)))) { 259 c->isfloating = r->isfloating;
260 c->isfloating = r->isfloating; 260 c->tags |= r->tags & TAGMASK;
261 c->tags |= r->tags & TAGMASK; 261 }
262 } 262 }
263 if(ch.res_class)
264 XFree(ch.res_class);
265 if(ch.res_name)
266 XFree(ch.res_name);
263 } 267 }
264 if(ch.res_class)
265 XFree(ch.res_class);
266 if(ch.res_name)
267 XFree(ch.res_name);
268 if(!c->tags) 268 if(!c->tags)
269 c->tags = tagset[seltags]; 269 c->tags = tagset[seltags];
270} 270}