JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
applied Gottox' applyrules() fix
[dwm.git] / dwm.c
diff --git a/dwm.c b/dwm.c
index e1d3b0a..852f7ac 100644 (file)
--- 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);
 }