Changeset 9019 for trunk/src/user32/winmouse.cpp
- Timestamp:
- Aug 16, 2002, 6:49:05 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/winmouse.cpp
r8702 r9019 1 /* $Id: winmouse.cpp,v 1.2 5 2002-06-18 09:32:26sandervl Exp $ */1 /* $Id: winmouse.cpp,v 1.26 2002-08-16 16:49:05 sandervl Exp $ */ 2 2 /* 3 3 * Win32 mouse functions … … 69 69 BOOL WIN32API SetCursorPos( int X, int Y) 70 70 { 71 BOOL ret; 72 dprintf(("USER32: SetCursorPos (%d,%d)", X,Y)); 71 BOOL ret; 72 POINT point; 73 MSLLHOOKSTRUCT hook; 74 75 GetCursorPos(&point); 76 dprintf(("USER32: SetCursorPos (%d,%d)->(%d,%d)", point.x, point.y, X,Y)); 77 78 //The current cursor position may not have been passed to the application 79 //just yet. The position change discards any previous events which may 80 //lead to inconsistent mouse behaviour (like in DirectInput). 81 //To fix this, we pass down a mouse move event to any hook handlers. 82 hook.pt.x = point.x; 83 hook.pt.y = point.y; 84 hook.mouseData = 0; 85 hook.flags = 0; 86 hook.time = GetCurrentTime(); 87 hook.dwExtraInfo = 0; 88 HOOK_CallHooksW( WH_MOUSE_LL, HC_ACTION, WM_MOUSEMOVE, (LPARAM)&hook); 73 89 74 90 ret = OSLibWinSetPointerPos(X, mapScreenY(Y)); 75 91 if(ret == TRUE) { 76 MSLLHOOKSTRUCT hook;77 78 92 hook.pt.x = X; 79 93 hook.pt.y = Y;
Note:
See TracChangeset
for help on using the changeset viewer.