X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=dwm.c;h=852f7ac946dc1e39bee8489f03d37675d19e6620;hb=146ff227fe0d231bcfc59268364461ab8850c5fe;hp=ef241a3c04f65e064757717a87d4752f994c4606;hpb=6229ed20c2af107305eccb8b536afd8620443647;p=dwm.git diff --git a/dwm.c b/dwm.c index ef241a3..852f7ac 100644 --- a/dwm.c +++ b/dwm.c @@ -261,9 +261,9 @@ applyrules(Client *c) { XGetClassHint(dpy, c->win, &ch); for(i = 0; i < LENGTH(rules); i++) { r = &rules[i]; - if((r->title && strstr(c->name, r->title)) - || (ch.res_class && r->class && strstr(ch.res_class, r->class)) - || (ch.res_name && r->instance && strstr(ch.res_name, r->instance))) + 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; if(r->tag) {