From 732be70cc40fd8b07e66116c77478ee299f1f5b4 Mon Sep 17 00:00:00 2001 From: rsc Date: Wed, 31 Mar 2004 05:15:02 +0000 Subject: Avoid bad mouse buffering. --- src/libdraw/x11-mouse.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/libdraw/x11-mouse.c b/src/libdraw/x11-mouse.c index d2d0126b..92a099b0 100644 --- 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); -- cgit v1.2.3