Revision: 1525
http://freeglut.svn.sourceforge.net/freeglut/?rev=1525&view=rev
Author: dcnieho
Date: 2013-02-27 10:46:13 +0000 (Wed, 27 Feb 2013)
Log Message:
-----------
Mousemotion events now generated outside the window until all mouse
buttons released, as is done on X11 (according to comments i now
deleted)
Modified Paths:
--------------
trunk/freeglut/freeglut/src/mswin/fg_main_mswin.c
Modified: trunk/freeglut/freeglut/src/mswin/fg_main_mswin.c
===================================================================
--- trunk/freeglut/freeglut/src/mswin/fg_main_mswin.c 2013-02-27 10:29:24 UTC (rev 1524)
+++ trunk/freeglut/freeglut/src/mswin/fg_main_mswin.c 2013-02-27 10:46:13 UTC (rev 1525)
@@ -736,17 +736,16 @@
window->State.MouseX, window->State.MouseY ) )
break;
- /* Set capture so that the window captures all the mouse messages */
- /*
- * XXX - Multiple button support: Under X11, the mouse is not released
- * XXX - from the window until all buttons have been released, even if the
- * XXX - user presses a button in another window. This will take more
- * XXX - code changes than I am up to at the moment (10/5/04). The present
- * XXX - is a 90 percent solution.
+ /* Set capture so that the window captures all the mouse messages
+ *
+ * The mouse is not released from the window until all buttons have
+ * been released, even if the user presses a button in another window.
+ * This is consistent with the behavior on X11.
*/
if ( pressed == GL_TRUE )
SetCapture ( window->Window.Handle ) ;
- else
+ else if (!GetAsyncKeyState(VK_LBUTTON) && !GetAsyncKeyState(VK_MBUTTON) && !GetAsyncKeyState(VK_RBUTTON))
+ /* Make sure all mouse buttons are released before releasing capture */
ReleaseCapture () ;
if( ! FETCH_WCB( *window, Mouse ) )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.