tAvoid bad mouse buffering. - plan9port - [fork] Plan 9 from user space (HTM) git clone git://src.adamsgaard.dk/plan9port (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit 732be70cc40fd8b07e66116c77478ee299f1f5b4 (DIR) parent 1ed1c638a8f5c8d1d3c624800448f44cee8d1a09 (HTM) Author: rsc <devnull@localhost> Date: Wed, 31 Mar 2004 05:15:02 +0000 Avoid bad mouse buffering. Diffstat: M src/libdraw/x11-mouse.c | 7 +++++++ 1 file changed, 7 insertions(+), 0 deletions(-) --- (DIR) diff --git a/src/libdraw/x11-mouse.c b/src/libdraw/x11-mouse.c t@@ -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);