From: Anselm R Garbe Date: Mon, 18 Aug 2008 18:19:15 +0000 (+0100) Subject: applied Martin Hurtons resizemouse patch X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=47f63dce550fab02f9d15aca5cec8c137125ac16;p=dwm.git applied Martin Hurtons resizemouse patch --- diff --git a/dwm.c b/dwm.c index 293f9cf..146d344 100644 --- a/dwm.c +++ b/dwm.c @@ -1127,15 +1127,9 @@ resizemouse(const Arg *arg) { None, cursor[CurResize], CurrentTime) != GrabSuccess) return; XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w + c->bw - 1, c->h + c->bw - 1); - for(;;) { + do { XMaskEvent(dpy, MOUSEMASK|ExposureMask|SubstructureRedirectMask , &ev); switch(ev.type) { - case ButtonRelease: - XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, - c->w + c->bw - 1, c->h + c->bw - 1); - XUngrabPointer(dpy, CurrentTime); - while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); - return; case ConfigureRequest: case Expose: case MapRequest: @@ -1157,6 +1151,10 @@ resizemouse(const Arg *arg) { break; } } + while(ev.type != ButtonRelease); + XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w + c->bw - 1, c->h + c->bw - 1); + XUngrabPointer(dpy, CurrentTime); + while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); } void