applied Martin Hurtons resizemouse patch
Anselm R Garbe garbeam@gmail.com
Mon, 18 Aug 2008 19:19:15 +0100
1 files changed,
5 insertions(+),
7 deletions(-)
jump to
M
dwm.c
→
dwm.c
@@ -1127,15 +1127,9 @@ if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
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 @@ resize(c, c->x, c->y, nw, nh, True);
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