mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 20:01:22 +00:00
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:
parent
c3cdc8ebba
commit
c3004129ed
2 changed files with 13 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue