X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=event.c;h=eab9b1282ccd532bae6a594240c7ab2273c37d6c;hb=10885d349a8426f0a55f34e78a2592267e8e55be;hp=f4ac2d546a64a39a8f683c07e054b96df141a46e;hpb=b427a2c6cb9c221075e42d0d1007e980a949a7df;p=dwm.git diff --git a/event.c b/event.c index f4ac2d5..eab9b12 100644 --- a/event.c +++ b/event.c @@ -123,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); @@ -177,8 +175,9 @@ configurerequest(XEvent *e) { configure(c); XSync(dpy, False); if(c->isfloat) { - if(isvisible(c)) - resize(c, False, TopLeft); + resize(c, False, TopLeft); + if(!isvisible(c)) + ban(c); } else arrange(NULL);