X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=event.c;h=e85e11f9054a18094f4134e3020a3c54b137ca7f;hb=86d9851427710ca0f3ab95ae9b6c20361b56e516;hp=5ff6b911d8df91848c0a9ce80172228bf522b9f8;hpb=8b59083eb13c0712e04d9a5b6d7bf4af5913c442;p=dwm.git diff --git a/event.c b/event.c index 5ff6b91..e85e11f 100644 --- a/event.c +++ b/event.c @@ -9,7 +9,7 @@ #include #include -#include "wm.h" +#include "dwm.h" /* local functions */ static void buttonpress(XEvent *e); @@ -89,6 +89,7 @@ configurerequest(XEvent *e) if(ev->value_mask & CWBorderWidth) c->border = ev->border_width; 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;