X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=event.c;h=3086284bd576d189b3466e0884fe2dae30bb7b02;hb=e7508783e85aba0ce4ab09b0dd76c40342113aed;hp=4b3c1e365cbf286488bae9085fc3783f04c75c3a;hpb=e9c49ddd7a021e99dc2e7518736211ab5bc8cf2c;p=dwm.git diff --git a/event.c b/event.c index 4b3c1e3..3086284 100644 --- a/event.c +++ b/event.c @@ -137,10 +137,11 @@ buttonpress(XEvent *e) { return; } } - if(ev->x < x + bmw) + if(ev->x < x + blw) switch(ev->button) { case Button1: - togglemode(NULL); + a.i = -1; + setlayout(&a); break; case Button4: a.i = 1; @@ -156,14 +157,14 @@ buttonpress(XEvent *e) { focus(c); if(CLEANMASK(ev->state) != MODKEY) return; - if(ev->button == Button1 && (arrange == dofloat || c->isfloat)) { + if(ev->button == Button1 && (lt->arrange == versatile || c->isversatile)) { restack(); movemouse(c); } else if(ev->button == Button2) zoom(NULL); else if(ev->button == Button3 - && (arrange == dofloat || c->isfloat) && !c->isfixed) + && (lt->arrange == versatile || c->isversatile) && !c->isfixed) { restack(); resizemouse(c); @@ -181,7 +182,7 @@ configurerequest(XEvent *e) { c->ismax = False; if(ev->value_mask & CWBorderWidth) c->border = ev->border_width; - if(c->isfixed || c->isfloat || (arrange == dofloat)) { + if(c->isfixed || c->isversatile || (lt->arrange == versatile)) { if(ev->value_mask & CWX) c->x = ev->x; if(ev->value_mask & CWY) @@ -309,8 +310,8 @@ propertynotify(XEvent *e) { default: break; case XA_WM_TRANSIENT_FOR: XGetTransientForHint(dpy, c->win, &trans); - if(!c->isfloat && (c->isfloat = (trans != 0))) - arrange(); + if(!c->isversatile && (c->isversatile = (getclient(trans) != NULL))) + lt->arrange(); break; case XA_WM_NORMAL_HINTS: updatesizehints(c);