winex11drv: Return cached cursor_pos in GetCursorPos().

Vitaliy Margolen wine-patches at kievinfo.com
Mon Dec 18 14:26:35 CST 2006


Changes from last try:
  Added test to test for WM_MOUSEMOVE after SetCursorPos().
  Changed 2sec delay to 100ms

Change Log:
  Return cached cursor_pos in GetCursorPos().
  Use "last_time_updated" to revert to old behavior or when mouse position
  hasn't been updated for some time.
  Don't change actual cursor position in SetCursorPos() if it hasn't changed.

We need change to SetCursorPos() to fix introduced timing issues with some games.
They pull cursor position with GetCursrorPos() then if cursor moved, reset it to
center with SetCursorPos(). In a sense we need to "cache" both operations here.

However windows will still send WM_MOUSEMOVE even when cursor position hasn't
changed. And some games depend on that as well to clear their mouse state.
---
 dlls/user32/tests/win.c  |    9 +++++++++
 dlls/winex11.drv/mouse.c |   13 ++++++++++++-
 2 files changed, 21 insertions(+), 1 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 7d64afed96d0110f50ac2d5d7ae0e73152b0eb00.diff
Type: text/x-patch
Size: 2651 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20061218/b105a53e/7d64afed96d0110f50ac2d5d7ae0e73152b0eb00.bin


More information about the wine-patches mailing list