summaryrefslogtreecommitdiffstats
path: root/Gui
diff options
context:
space:
mode:
authorpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-01-12 17:34:46 +0000
committerpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-01-12 17:34:46 +0000
commit944518c7dda107c854fa808bfe9c7574899d70e2 (patch)
treed0049f42ad0a87d8cfc715b57d02e7753807fd87 /Gui
parented91a8bad3043f14a71981c5c7be271055d678db (diff)
downloadmpv-944518c7dda107c854fa808bfe9c7574899d70e2.tar.bz2
mpv-944518c7dda107c854fa808bfe9c7574899d70e2.tar.xz
motion fix from Gregory Kovriga <gkovriga@techunix.technion.ac.il>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8917 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui')
-rw-r--r--Gui/wm/ws.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/Gui/wm/ws.c b/Gui/wm/ws.c
index cf04488c92..d5d4e4821b 100644
--- a/Gui/wm/ws.c
+++ b/Gui/wm/ws.c
@@ -605,7 +605,20 @@ keypressed:
#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;