disallow zoom on maximized clients
Anselm R.Garbe arg@10ksloc.org
Thu, 10 Aug 2006 10:16:12 +0200
M
dwm.h
→
dwm.h
@@ -91,7 +91,6 @@ extern Client *getctitle(Window w);
extern void gravitate(Client *c, Bool invert); extern void higher(Client *c); extern void killclient(Arg *arg); -extern void lower(Client *c); extern void manage(Window w, XWindowAttributes *wa); extern void resize(Client *c, Bool sizehints, Corner sticky); extern void setsize(Client *c);
M
event.c
→
event.c
@@ -127,15 +127,14 @@ switch(ev->button) {
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); } - else - zoom(NULL); - break; - case Button2: - lower(c); break; case Button3: if(!c->ismax && (arrange == dofloat || c->isfloat)) {@@ -225,7 +224,7 @@ {
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)))