JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
updated configurenotify
[dwm.git] / dwm.c
diff --git a/dwm.c b/dwm.c
index 533632a..0f833b3 100644 (file)
--- a/dwm.c
+++ b/dwm.c
@@ -259,7 +259,7 @@ applyrules(Client *c) {
        XGetClassHint(dpy, c->win, &ch);
        for(i = 0; i < LENGTH(rules); i++) {
                r = &rules[i];
-               if(strstr(c->name, r->title)
+               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)))
                {
@@ -423,8 +423,11 @@ void
 configurenotify(XEvent *e) {
        XConfigureEvent *ev = &e->xconfigure;
 
-       if(ev->window == root && (ev->width != sw || ev->height != sh))
+       if(ev->window == root && (ev->width != sw || ev->height != sh)) {
+               sw = ev->width;
+               sh = ev->height;
                setgeom(NULL);
+       }
 }
 
 void