# HG changeset patch # User pontscho # Date 1042392886 0 # Node ID e3bce015931717ffcde21c42c1ae8909fa0388ad # Parent 1c09d26183f57e58d0cd2783416a2fcfab4d985c motion fix from Gregory Kovriga diff -r 1c09d26183f5 -r e3bce0159317 Gui/wm/ws.c --- a/Gui/wm/ws.c Sun Jan 12 16:45:42 2003 +0000 +++ b/Gui/wm/ws.c Sun Jan 12 17:34:46 2003 +0000 @@ -605,7 +605,20 @@ #endif break; - case MotionNotify: i=wsMoveMouse; goto buttonreleased; + case MotionNotify: + i=wsMoveMouse; + { + /* pump all motion events from the display queue: + this way it works faster when moving the window */ + static XEvent e; + while(XCheckTypedWindowEvent(display,Event->xany.window,MotionNotify,&e)){ + /* FIXME: need to make sure we didn't release/press the button in between...*/ + /* FIXME: do we need some timeout here to make sure we don't spend too much time + removing events from the queue? */ + Event = &e; + } + } + goto buttonreleased; case ButtonRelease: i=Event->xbutton.button + 128; goto buttonreleased; case ButtonPress: i=Event->xbutton.button; goto buttonreleased; case EnterNotify: i=wsEnterWindow; goto buttonreleased;