x11drv: Use internal cached cursor position for GetCursorPos. [next try]

Vitaliy Margolen wine-patch at kievinfo.com
Wed Oct 18 23:48:48 CDT 2006

Change log:
    x11drv: Use internal cached cursor position for GetCursorPos.
    Query X directly only when cursor is outside process' windows.

Dropped new critical section and just used x11_lock.
The read-modify-write sequence is still broken. But since there were
no comments about this on wine-devel it's left as-is.

We need to use cached cursor position in GetCursorPos() because it should
return previous position inside hook handler. And get updated right after
hook chain is finished and we sent appropriate mouse messages.

However we have a problem with synchronizing this cached cursor position
between processes. To solve that we can either share that information
between processes or query X the same we did before, if cursor is outside
process' windows.
 dlls/winex11.drv/event.c  |    4 ++--
 dlls/winex11.drv/mouse.c  |   26 +++++++++++++++++++-------
 dlls/winex11.drv/window.c |    2 +-
 dlls/winex11.drv/x11drv.h |    1 +
 4 files changed, 23 insertions(+), 10 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 73e3750829c9bc766fb6a2d542beb02644d9e77e.diff
Type: text/x-patch
Size: 4833 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20061018/cf53f997/73e3750829c9bc766fb6a2d542beb02644d9e77e-0001.bin

More information about the wine-patches mailing list