X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=event.c;h=0f984f2fae13afa6127e9720145062055933d9db;hb=30561a0161629b15abe1beeb97eec3fc0768efaf;hp=2e4f62ee74277de12b1babc8d2e2c9fe4aae0b3a;hpb=c225e1afc23e6862f9864bad3b7b11399dda36a1;p=dwm.git diff --git a/event.c b/event.c index 2e4f62e..0f984f2 100644 --- a/event.c +++ b/event.c @@ -127,14 +127,15 @@ buttonpress(XEvent *e) default: break; case Button1: - if(!c->ismax && (arrange == dofloat || c->isfloat)) { - higher(c); - movemouse(c); + if(!c->ismax) { + if(arrange == dofloat || c->isfloat) { + higher(c); + movemouse(c); + } + else + zoom(NULL); } break; - case Button2: - lower(c); - break; case Button3: if(!c->ismax && (arrange == dofloat || c->isfloat)) { higher(c); @@ -223,7 +224,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)))