plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit 732be70cc40fd8b07e66116c77478ee299f1f5b4
parent 1ed1c638a8f5c8d1d3c624800448f44cee8d1a09
Author: rsc <devnull@localhost>
Date:   Wed, 31 Mar 2004 05:15:02 +0000

Avoid bad mouse buffering.

Diffstat:
Msrc/libdraw/x11-mouse.c | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/libdraw/x11-mouse.c b/src/libdraw/x11-mouse.c @@ -93,6 +93,13 @@ _ioproc(void *arg) case ButtonPress: case ButtonRelease: case MotionNotify: + /* If the motion notifications are backing up, skip over some. */ + if(xevent.type == MotionNotify){ + while(XCheckWindowEvent(_x.mousecon, _x.drawable, MouseMask, &xevent)){ + if(xevent.type != MotionNotify) + break; + } + } if(_xtoplan9mouse(_x.mousecon, &xevent, &m) < 0) continue; send(mc->c, &m);