Module: wine Branch: master Commit: 938657b1c1ff1f6c05b3a521a60f3dcfef0d196b URL: http://source.winehq.org/git/wine.git/?a=commit;h=938657b1c1ff1f6c05b3a521a6...
Author: Vitaliy Margolen wine-patches@kievinfo.com Date: Wed Dec 20 01:05:42 2006 -0700
dinput: Warp mouse in exclusive cooperation mode only.
---
dlls/dinput/mouse.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c index 2894fb6..9ab1b1f 100644 --- a/dlls/dinput/mouse.c +++ b/dlls/dinput/mouse.c @@ -311,7 +311,7 @@ static LRESULT CALLBACK dinput_mouse_hoo queue_event((LPDIRECTINPUTDEVICE8A)This, This->base.data_format.offsets[WINE_MOUSE_Y_POSITION], pt1.y, hook->time, This->dinput->evsequence);
- This->need_warp = (pt.x || pt.y); + This->need_warp = (pt.x || pt.y) && dwCoop & DISCL_EXCLUSIVE; break; } case WM_LBUTTONDOWN: @@ -434,7 +434,7 @@ static HRESULT WINAPI SysMouseAImpl_Acqu This->win_centerY = (rect.bottom - rect.top ) / 2;
/* Warp the mouse to the center of the window */ - if (!(This->base.data_format.user_df->dwFlags & DIDF_ABSAXIS)) + if (This->base.dwCoopLevel & DISCL_EXCLUSIVE) { This->mapped_center.x = This->win_centerX; This->mapped_center.y = This->win_centerY; @@ -472,7 +472,7 @@ static HRESULT WINAPI SysMouseAImpl_Unac ERR("this(%p) != current_lock(%p)\n", This, current_lock);
/* And put the mouse cursor back where it was at acquire time */ - if (!(This->base.data_format.user_df->dwFlags & DIDF_ABSAXIS)) + if (This->base.dwCoopLevel & DISCL_EXCLUSIVE) { TRACE(" warping mouse back to (%d , %d)\n", This->org_coords.x, This->org_coords.y); SetCursorPos(This->org_coords.x, This->org_coords.y);