Mousemotion events now generated outside the window until all mouse

buttons released, as is done on X11 (according to comments i now
deleted)


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1525 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
dcnieho 2013-02-27 10:46:13 +00:00
parent 371adb260e
commit a5ed343b38

View File

@ -736,17 +736,16 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPAR
window->State.MouseX, window->State.MouseY ) ) window->State.MouseX, window->State.MouseY ) )
break; break;
/* Set capture so that the window captures all the mouse messages */ /* Set capture so that the window captures all the mouse messages
/* *
* XXX - Multiple button support: Under X11, the mouse is not released * The mouse is not released from the window until all buttons have
* XXX - from the window until all buttons have been released, even if the * been released, even if the user presses a button in another window.
* XXX - user presses a button in another window. This will take more * This is consistent with the behavior on X11.
* XXX - code changes than I am up to at the moment (10/5/04). The present
* XXX - is a 90 percent solution.
*/ */
if ( pressed == GL_TRUE ) if ( pressed == GL_TRUE )
SetCapture ( window->Window.Handle ) ; 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 () ; ReleaseCapture () ;
if( ! FETCH_WCB( *window, Mouse ) ) if( ! FETCH_WCB( *window, Mouse ) )