[PATCH 2/2] dinput: Use CALLWINDPROC hook to monitor focus loses
away from acquired windows.
Vitaliy Margolen
wine-patches at kievinfo.com
Sun Jul 15 11:40:00 CDT 2007
This is required for dinput to release mouse and keyboard when foreground
window becomes background. But do this only when coop level is DISCL_FOREGROUND.
To accomplish this set global CALLWINDPROC hook and monitor some messages
sent to windows, associated with acquired DI devices. Because message itself
is not a guarantee that window is not foreground anymore, check this
explicitly.
Window sub-classing won't work if app subclasses the window itself. Also it
makes it complicated to track multiple devices associated with one window
(which is the case most of the time - with keyboard and mouse).
Almost a resend - I had rearranged few [Enter|Leave]CritSection calls in the
prior patch that should fix the deadlocking problem.
---
dlls/dinput/dinput_main.c | 58 +++++++++++++++++++++++++++++++++++++++++++++
dlls/dinput/tests/mouse.c | 1 -
2 files changed, 58 insertions(+), 1 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 47d3205b8fc47c92379328dd0c8d35d3e3b0c424.diff
Type: text/x-patch
Size: 3120 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070715/ab2945c9/47d3205b8fc47c92379328dd0c8d35d3e3b0c424-0001.bin
More information about the wine-patches
mailing list