Browse Source

applied Martin Hurtons resizemouse patch

main
Anselm R Garbe 16 years ago
parent
commit
47f63dce55
1 changed files with 5 additions and 7 deletions
  1. +5
    -7
      dwm.c

+ 5
- 7
dwm.c View File

@ -1127,15 +1127,9 @@ resizemouse(const Arg *arg) {
None, cursor[CurResize], CurrentTime) != GrabSuccess) None, cursor[CurResize], CurrentTime) != GrabSuccess)
return; return;
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w + c->bw - 1, c->h + c->bw - 1); 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); XMaskEvent(dpy, MOUSEMASK|ExposureMask|SubstructureRedirectMask , &ev);
switch(ev.type) { 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 ConfigureRequest:
case Expose: case Expose:
case MapRequest: case MapRequest:
@ -1157,6 +1151,10 @@ resizemouse(const Arg *arg) {
break; 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 void


Loading…
Cancel
Save