X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=event.c;h=36d873f983907a3d7b28590ca889d09acd5bbea3;hb=4bd0d33f57c6fb764ef546a9b0ebfcd20ff1df70;hp=2e4f62ee74277de12b1babc8d2e2c9fe4aae0b3a;hpb=c225e1afc23e6862f9864bad3b7b11399dda36a1;p=dwm.git diff --git a/event.c b/event.c index 2e4f62e..36d873f 100644 --- a/event.c +++ b/event.c @@ -122,24 +122,22 @@ buttonpress(XEvent *e) } } else if((c = getclient(ev->window))) { + higher(c); focus(c); switch(ev->button) { default: break; case Button1: - if(!c->ismax && (arrange == dofloat || c->isfloat)) { - higher(c); + if(!c->ismax && (arrange == dofloat || c->isfloat)) movemouse(c); - } break; case Button2: - lower(c); + if(!c->ismax && arrange != dofloat && !c->isfloat) + zoom(NULL); break; case Button3: - if(!c->ismax && (arrange == dofloat || c->isfloat)) { - higher(c); + if(!c->ismax && (arrange == dofloat || c->isfloat)) resizemouse(c); - } break; } } @@ -223,7 +221,7 @@ enternotify(XEvent *e) Client *c; XCrossingEvent *ev = &e->xcrossing; - if(ev->detail == NotifyInferior) + if(ev->mode != NotifyNormal || ev->detail == NotifyInferior) return; if((c = getclient(ev->window)) || (c = getctitle(ev->window)))