X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=event.c;h=eab9b1282ccd532bae6a594240c7ab2273c37d6c;hb=10885d349a8426f0a55f34e78a2592267e8e55be;hp=50c59a0c9ef78db7b4dd1d1907c9c0eab7756fe8;hpb=b4d53bf194f9f9214b6c79d397d723ba53663b4b;p=dwm.git diff --git a/event.c b/event.c index 50c59a0..eab9b12 100644 --- a/event.c +++ b/event.c @@ -1,4 +1,3 @@ -#include /* * (C)opyright MMVI Anselm R. Garbe * See LICENSE file for license details. @@ -124,10 +123,8 @@ buttonpress(XEvent *e) { return; } } - if(ev->x < x + bmw) { - if(ev->button == Button1) - togglemode(NULL); - } + if((ev->x < x + bmw) && (ev->button == Button1)) + togglemode(NULL); } else if((c = getclient(ev->window))) { focus(c); @@ -151,10 +148,8 @@ configurerequest(XEvent *e) { unsigned long newmask; Client *c; XConfigureRequestEvent *ev = &e->xconfigurerequest; - XEvent synev; XWindowChanges wc; - fputs("configurerequest\n", stderr); if((c = getclient(ev->window))) { c->ismax = False; gravitate(c, True); @@ -179,8 +174,11 @@ configurerequest(XEvent *e) { else configure(c); XSync(dpy, False); - if(c->isfloat) + if(c->isfloat) { resize(c, False, TopLeft); + if(!isvisible(c)) + ban(c); + } else arrange(NULL); } @@ -211,7 +209,6 @@ enternotify(XEvent *e) { Client *c; XCrossingEvent *ev = &e->xcrossing; - fputs("enternotify\n", stderr); if(ev->mode != NotifyNormal || ev->detail == NotifyInferior) return; @@ -299,7 +296,6 @@ propertynotify(XEvent *e) { Window trans; XPropertyEvent *ev = &e->xproperty; - fputs("propertynotify\n", stderr); if(ev->state == PropertyDelete) return; /* ignore */ @@ -321,6 +317,7 @@ propertynotify(XEvent *e) { } if(ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName]) { updatetitle(c); + resizetitle(c); drawtitle(c); } }