X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=event.c;h=0f984f2fae13afa6127e9720145062055933d9db;hb=b79b5facb104a653314577bb7f15824396b9e94b;hp=c3169aa7001c3434f214028d6371c38985f048c4;hpb=92e55c7c53cb808b584982ac8f6d69112d713fab;p=dwm.git diff --git a/event.c b/event.c index c3169aa..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); @@ -146,18 +147,6 @@ buttonpress(XEvent *e) } static void -clientmessage(XEvent *e) -{ - Client *c; - XClientMessageEvent *ev = &e->xclient; - - if(ev->message_type == netatom[NetActiveWindow]) { - if((c = getclient(ev->window)) && c->tags[tsel]) - focus(c); - } -} - -static void configurerequest(XEvent *e) { Client *c; @@ -235,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))) @@ -351,7 +340,6 @@ unmapnotify(XEvent *e) void (*handler[LASTEvent]) (XEvent *) = { [ButtonPress] = buttonpress, - [ClientMessage] = clientmessage, [ConfigureRequest] = configurerequest, [DestroyNotify] = destroynotify, [EnterNotify] = enternotify,