JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
continued with man page
[dwm.git] / event.c
diff --git a/event.c b/event.c
index 5ff6b91..c55be0f 100644 (file)
--- a/event.c
+++ b/event.c
@@ -9,7 +9,7 @@
 #include <X11/keysym.h>
 #include <X11/Xatom.h>
 
-#include "wm.h"
+#include "dwm.h"
 
 /* local functions */
 static void buttonpress(XEvent *e);
@@ -87,8 +87,9 @@ configurerequest(XEvent *e)
                if(ev->value_mask & CWHeight)
                        c->h = ev->height;
                if(ev->value_mask & CWBorderWidth)
-                       c->border = ev->border_width;
+                       c->border = 1;
                gravitate(c, False);
+               resize(c, True);
        }
 
        wc.x = ev->x;
@@ -179,6 +180,7 @@ static void
 propertynotify(XEvent *e)
 {
        XPropertyEvent *ev = &e->xproperty;
+       Window trans;
        Client *c;
 
        if(ev->state == PropertyDelete)
@@ -192,9 +194,10 @@ propertynotify(XEvent *e)
                switch (ev->atom) {
                        default: break;
                        case XA_WM_TRANSIENT_FOR:
-                               XGetTransientForHint(dpy, c->win, &c->trans);
+                               XGetTransientForHint(dpy, c->win, &trans);
+                               if(!c->floating && (c->floating = (trans != 0)))
+                                       arrange(NULL);
                                break;
-                               update_size(c);
                        case XA_WM_NORMAL_HINTS:
                                update_size(c);
                                break;