capture the mouse to get mouse moved events outside of window

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29912 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Doug Simons 2010-03-12 21:29:37 +00:00
parent c3cdc8ebba
commit c3004129ed
2 changed files with 13 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2010-03-12 Doug Simons <doug.simons@testplant.com>
* Source/win32/WIN32Server.m: Capture the mouse to get mouse
moved events outside of a window while a button is down.
2010-03-11 Doug Simons <doug.simons@testplant.com>
* Source/win32/WIN32Server.m: Prevent generating spurious

View file

@ -1965,7 +1965,15 @@ process_mouse_event(WIN32Server *svr, HWND hwnd, WPARAM wParam, LPARAM lParam,
clickCount = 1;
lastTime = ltime;
}
SetCapture(hwnd); // capture the mouse to get mouse moved events outside of window
}
else if ( ((eventType == NSLeftMouseUp)
|| (eventType == NSRightMouseUp)
|| (eventType == NSOtherMouseUp))
&& !((wParam & MK_LBUTTON) || (wParam & MK_MBUTTON) || (wParam & MK_RBUTTON)) )
{
ReleaseCapture(); // release capture when all mouse buttons are up
}
if (eventType == NSLeftMouseDown) lDown = YES;
if (eventType == NSRightMouseDown) rDown = YES;