[Mplayer-cvslog] CVS: main/Gui/wm ws.c,1.62,1.63

Zoltan Ponekker pontscho at mplayerhq.hu
Sun Jan 12 18:35:16 CET 2003


Update of /cvsroot/mplayer/main/Gui/wm
In directory mail:/var/tmp.root/cvs-serv4058

Modified Files:
	ws.c 
Log Message:


motion fix from Gregory Kovriga <gkovriga at techunix.technion.ac.il>


Index: ws.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/wm/ws.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- ws.c	9 Jan 2003 20:47:12 -0000	1.62
+++ ws.c	12 Jan 2003 17:34:46 -0000	1.63
@@ -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;



More information about the MPlayer-cvslog mailing list