diff options
| author | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2012-01-26 18:06:46 +0200 |
|---|---|---|
| committer | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2012-01-26 18:06:46 +0200 |
| commit | bc4ef17d71273ca9479aa09967e0fca8c7e6d066 (patch) | |
| tree | 9b95912257032eb7f6b5842f72de2fd521064af3 | |
| parent | 266e7f377fb0cd3be358ecf0c95dbd60bf780c66 (diff) | |
warp cursor to lower right corner when moving or resizing
| -rw-r--r-- | monsterwm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/monsterwm.c b/monsterwm.c index e656ab3..69b1baf 100644 --- a/monsterwm.c +++ b/monsterwm.c @@ -564,14 +564,14 @@ void mousemotion(const Arg *arg) { if (XGrabPointer(dis, root, False, BUTTONMASK|PointerMotionMask, GrabModeAsync, GrabModeAsync, None, None, CurrentTime) != GrabSuccess) return; int x, y, z, xw, yh; unsigned int v; Window w; + XWarpPointer(dis, None, current->win, 0, 0, 0, 0, wa.width, wa.height); XQueryPointer(dis, root, &w, &w, &x, &y, &z, &z, &v); XEvent ev; do { XMaskEvent(dis, BUTTONMASK|PointerMotionMask|SubstructureRedirectMask, &ev); switch (ev.type) { - case ConfigureRequest: - case MapRequest: + case ConfigureRequest: case MapRequest: events[ev.type](&ev); break; case MotionNotify: |
