[PATCH] winex11.drv: Force changing lock keys state if hooks blocked keyboard input processing.

Jacek Caban jacek at codeweavers.com
Mon Oct 22 09:29:42 CDT 2018


Signed-off-by: Jacek Caban <jacek at codeweavers.com>
---

This fixes https://github.com/ValveSoftware/Proton/issues/911

If the game is ran with numlock enabled, Wine will try to sync on the
first key event. The game uses dinput in exclusive mode, so our low
level keyboard hook prevents simulated numlock press in
update_lock_state. Thus, we simulate the same key press again on
following key events. It means that all key events will result in two
events on Wine side: (simulated) numlock press and the actual key press.
The patch avoids that by forcing Wine-side state to be the same as X
server state.

For this particular case, the game could theoretically be fixed on
dinput side (as part of rewrite on top of HID?), but it's still a bug in
winex11.drv that any other hooks could expose.

 dlls/winex11.drv/keyboard.c | 29 +++++++++++++++++++++++------
 1 file changed, 23 insertions(+), 6 deletions(-)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-winex11.drv-Force-changing-lock-keys-state-if-hooks-b.diff
Type: text/x-patch
Size: 3116 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20181022/c421ec06/attachment.bin>


More information about the wine-devel mailing list