X-Git-Url: https://git.xinqibao.xyz/dwm.git/blobdiff_plain/940240e5e6f16b292b2f6f37a05282617ce10fe9..146ff227fe0d231bcfc59268364461ab8850c5fe:/dwm.c diff --git a/dwm.c b/dwm.c index e1d3b0a..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) { @@ -1068,7 +1068,7 @@ monocle(void) { Client *c; for(c = clients; c; c = c->next) - if((lt->isfloating || !c->floating) && isvisible(c)) + if((lt->isfloating || !c->isfloating) && isvisible(c)) resize(c, mox, moy, mow - 2 * c->bw, moh - 2 * c->bw, RESIZEHINTS); }