mirror of https://github.com/0intro/wmii
adding XPending checks before pointer grabs
This commit is contained in:
parent
7509382a8c
commit
b59dee84cf
|
@ -195,9 +195,10 @@ do_mouse_move(Client *c, XButtonPressedEvent *e, Bool swap)
|
|||
pt.y = ey;
|
||||
XSync(dpy, False);
|
||||
|
||||
if(XGrabPointer(dpy, root, False, PointerMotionMask | ButtonReleaseMask,
|
||||
GrabModeAsync, GrabModeAsync, None, cursor[CurMove],
|
||||
e->time) != GrabSuccess)
|
||||
if(XPending(dpy) ||
|
||||
(XGrabPointer(dpy, root, False, PointerMotionMask | ButtonReleaseMask,
|
||||
GrabModeAsync, GrabModeAsync, None, cursor[CurMove], e->time)
|
||||
!= GrabSuccess))
|
||||
return;
|
||||
XGrabServer(dpy);
|
||||
|
||||
|
@ -438,9 +439,10 @@ do_mouse_resize(Client *c, XButtonPressedEvent *e, BlitzAlign align)
|
|||
XQueryPointer(dpy, c->framewin, &dummy, &dummy, &i, &i, &ox, &oy, &dmask);
|
||||
XSync(dpy, False);
|
||||
|
||||
if(XGrabPointer(dpy, c->framewin, False, PointerMotionMask | ButtonReleaseMask,
|
||||
GrabModeAsync, GrabModeAsync, None, cursor[CurResize],
|
||||
e->time) != GrabSuccess)
|
||||
if(XPending(dpy) ||
|
||||
(XGrabPointer(dpy, c->framewin, False, PointerMotionMask | ButtonReleaseMask,
|
||||
GrabModeAsync, GrabModeAsync, None, cursor[CurResize], e->time)
|
||||
!= GrabSuccess))
|
||||
return;
|
||||
XGrabServer(dpy);
|
||||
|
||||
|
|
Loading…
Reference in New Issue