aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnselm R Garbe <garbeam@gmail.com>2008-08-18 19:19:15 +0100
committerAnselm R Garbe <garbeam@gmail.com>2008-08-18 19:19:15 +0100
commit47f63dce550fab02f9d15aca5cec8c137125ac16 (patch)
tree7d46ab78ea9fe5830602a2d8092636cc60b963e8
parent02a8ca95cf22d9b1da50dffffefa31fb563c3852 (diff)
downloaddwm-47f63dce550fab02f9d15aca5cec8c137125ac16.tar.gz
dwm-47f63dce550fab02f9d15aca5cec8c137125ac16.tar.bz2
dwm-47f63dce550fab02f9d15aca5cec8c137125ac16.zip
applied Martin Hurtons resizemouse patch
-rw-r--r--dwm.c12
1 files changed, 5 insertions, 7 deletions
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