Disabled user32-rawinput-keyboard patchset

Disabled by request

Causing regressions
https://bugs.winehq.org/show_bug.cgi?id=48419
https://bugs.winehq.org/show_bug.cgi?id=48462
This commit is contained in:
Alistair Leslie-Hughes 2020-01-15 08:16:56 +11:00
parent 695a835b0a
commit d8496cacd1
3 changed files with 19 additions and 52 deletions

View File

@ -305,7 +305,6 @@ patch_enable_all ()
enable_user32_ShowWindow="$1"
enable_user32_msgbox_Support_WM_COPY_mesg="$1"
enable_user32_rawinput_hid="$1"
enable_user32_rawinput_keyboard="$1"
enable_user32_rawinput_mouse="$1"
enable_user32_rawinput_mouse_experimental="$1"
enable_user32_rawinput_nolegacy="$1"
@ -1049,9 +1048,6 @@ patch_enable ()
user32-rawinput-hid)
enable_user32_rawinput_hid="$2"
;;
user32-rawinput-keyboard)
enable_user32_rawinput_keyboard="$2"
;;
user32-rawinput-mouse)
enable_user32_rawinput_mouse="$2"
;;
@ -1691,13 +1687,6 @@ if test "$enable_user32_rawinput_mouse_experimental" -eq 1; then
enable_user32_rawinput_nolegacy=1
fi
if test "$enable_user32_rawinput_keyboard" -eq 1; then
if test "$enable_user32_rawinput_hid" -gt 1; then
abort "Patchset user32-rawinput-hid disabled, but user32-rawinput-keyboard depends on that."
fi
enable_user32_rawinput_hid=1
fi
if test "$enable_user32_rawinput_hid" -eq 1; then
if test "$enable_user32_rawinput_nolegacy" -gt 1; then
abort "Patchset user32-rawinput-nolegacy disabled, but user32-rawinput-hid depends on that."
@ -6642,29 +6631,6 @@ if test "$enable_user32_rawinput_hid" -eq 1; then
) >> "$patchlist"
fi
# Patchset user32-rawinput-keyboard
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * winex11.drv-mouse-coorrds, user32-rawinput-mouse, user32-rawinput-nolegacy, user32-rawinput-hid
# |
# | Modified files:
# | * dlls/dinput/device.c, dlls/dinput/device_private.h, dlls/dinput/keyboard.c, dlls/dinput/mouse.c,
# | dlls/dinput8/tests/device.c, dlls/user32/rawinput.c, dlls/user32/tests/input.c, dlls/winex11.drv/keyboard.c,
# | dlls/winex11.drv/mouse.c, dlls/winex11.drv/x11drv.h, server/queue.c
# |
if test "$enable_user32_rawinput_keyboard" -eq 1; then
patch_apply user32-rawinput-keyboard/0001-dinput-Add-DIERR_INPUTLOST-error-code-support-for-DI.patch
patch_apply user32-rawinput-keyboard/0002-dinput8-Use-raw-input-interface-for-dinput8-keyboard.patch
patch_apply user32-rawinput-keyboard/0003-user32-Add-support-for-RIDEV_INPUTSINK-flag-in-Regis.patch
patch_apply user32-rawinput-keyboard/0004-winex11.drv-Listen-to-RawKey-events-in-the-desktop-t.patch
(
printf '%s\n' '+ { "Rémi Bernon", "dinput: Add DIERR_INPUTLOST error code support for DISCL_FOREGROUND cooperative level.", 1 },';
printf '%s\n' '+ { "Rémi Bernon", "dinput8: Use raw input interface for dinput8 keyboard device.", 1 },';
printf '%s\n' '+ { "Rémi Bernon", "user32: Add support for RIDEV_INPUTSINK flag in RegisterRawInputDevices.", 1 },';
printf '%s\n' '+ { "Rémi Bernon", "winex11.drv: Listen to RawKey* events in the desktop thread.", 1 },';
) >> "$patchlist"
fi
# Patchset user32-rawinput-mouse-experimental
# |
# | This patchset has the following (direct or indirect) dependencies:

View File

@ -1 +1,2 @@
Depends: user32-rawinput-hid
Disabled: True

View File

@ -1,4 +1,4 @@
From 614fe3af1cabb038c779700fa18dc4992747a164 Mon Sep 17 00:00:00 2001
From 298b86133dd143722c0395474c0a98e89c0af937 Mon Sep 17 00:00:00 2001
From: Ken Thomases <ken@codeweavers.com>
Date: Tue, 11 Dec 2018 08:30:41 +1100
Subject: [PATCH] winex11: Match keyboard in Unicode
@ -8,10 +8,10 @@ Subject: [PATCH] winex11: Match keyboard in Unicode
1 file changed, 98 insertions(+), 65 deletions(-)
diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c
index 4d113d8c184..b16d913a4a2 100644
index 37c96c926f4..95cb4100bc9 100644
--- a/dlls/winex11.drv/keyboard.c
+++ b/dlls/winex11.drv/keyboard.c
@@ -40,6 +40,7 @@
@@ -37,6 +37,7 @@
#include <ctype.h>
#include <stdarg.h>
#include <string.h>
@ -19,7 +19,7 @@ index 4d113d8c184..b16d913a4a2 100644
#define NONAMELESSUNION
@@ -79,7 +80,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
@@ -76,7 +77,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
};
static CRITICAL_SECTION kbd_section = { &critsect_debug, -1, 0, 0, 0, 0 };
@ -28,9 +28,9 @@ index 4d113d8c184..b16d913a4a2 100644
/* Keyboard translation tables */
#define MAIN_LEN 49
@@ -1455,6 +1456,36 @@ BOOL X11DRV_RawKeyEvent( XGenericEventCookie *cookie )
@@ -1417,6 +1418,36 @@ BOOL X11DRV_KeyEvent( HWND hwnd, XEvent *xev )
return TRUE;
}
#endif
+static WCHAR translate_keysym( Display *display, KeySym keysym )
+{
@ -65,7 +65,7 @@ index 4d113d8c184..b16d913a4a2 100644
/**********************************************************************
* X11DRV_KEYBOARD_DetectLayout
*
@@ -1471,8 +1502,8 @@ X11DRV_KEYBOARD_DetectLayout( Display *display )
@@ -1433,8 +1464,8 @@ X11DRV_KEYBOARD_DetectLayout( Display *display )
KeySym keysym = 0;
const char (*lkey)[MAIN_LEN][4];
unsigned max_seq = 0;
@ -76,7 +76,7 @@ index 4d113d8c184..b16d913a4a2 100644
syms = keysyms_per_keycode;
if (syms > 4) {
@@ -1485,35 +1516,25 @@ X11DRV_KEYBOARD_DetectLayout( Display *display )
@@ -1447,35 +1478,25 @@ X11DRV_KEYBOARD_DetectLayout( Display *display )
/* get data for keycode from X server */
for (i = 0; i < syms; i++) {
if (!(keysym = keycode_to_keysym (display, keyc, i))) continue;
@ -120,7 +120,7 @@ index 4d113d8c184..b16d913a4a2 100644
for (keyc = min_keycode; keyc <= max_keycode; keyc++) {
if (ckey[keyc][0]) {
/* search for a match in layout table */
@@ -1522,10 +1543,13 @@ X11DRV_KEYBOARD_DetectLayout( Display *display )
@@ -1484,10 +1505,13 @@ X11DRV_KEYBOARD_DetectLayout( Display *display )
/* the table, it's okay that the X server has "3#£", for example) */
/* however, the score will be higher for longer matches */
for (key = 0; key < MAIN_LEN; key++) {
@ -137,7 +137,7 @@ index 4d113d8c184..b16d913a4a2 100644
ok = -1;
}
if (ok > 0) {
@@ -1540,11 +1564,7 @@ X11DRV_KEYBOARD_DetectLayout( Display *display )
@@ -1502,11 +1526,7 @@ X11DRV_KEYBOARD_DetectLayout( Display *display )
if (key > pkey) seq++;
pkey = key;
} else {
@ -150,7 +150,7 @@ index 4d113d8c184..b16d913a4a2 100644
mismatch++;
score -= syms;
}
@@ -1651,9 +1671,11 @@ void X11DRV_InitKeyboard( Display *display )
@@ -1613,9 +1633,11 @@ void X11DRV_InitKeyboard( Display *display )
XKeyEvent e2;
WORD scan, vkey;
int keyc, i, keyn, syms;
@ -163,7 +163,7 @@ index 4d113d8c184..b16d913a4a2 100644
/* Ranges of OEM, function key, and character virtual key codes.
* Don't include those handled specially in X11DRV_ToUnicodeEx and
@@ -1710,7 +1732,11 @@ void X11DRV_InitKeyboard( Display *display )
@@ -1672,7 +1694,11 @@ void X11DRV_InitKeyboard( Display *display )
/* Detect the keyboard layout */
X11DRV_KEYBOARD_DetectLayout( display );
lkey = main_key_tab[kbd_layout].key;
@ -175,7 +175,7 @@ index 4d113d8c184..b16d913a4a2 100644
/* Now build two conversion arrays :
* keycode -> vkey + scancode + extended
@@ -1751,26 +1777,14 @@ void X11DRV_InitKeyboard( Display *display )
@@ -1713,26 +1739,14 @@ void X11DRV_InitKeyboard( Display *display )
int maxlen=0,maxval=-1,ok;
for (i=0; i<syms; i++) {
keysym = keycode_to_keysym(display, keyc, i);
@ -207,7 +207,7 @@ index 4d113d8c184..b16d913a4a2 100644
if (!ok) i--; /* we overshot */
if (ok||(i>maxlen)) {
maxlen=i; maxval=keyn;
@@ -2388,7 +2402,7 @@ INT CDECL X11DRV_GetKeyNameText(LONG lParam, LPWSTR lpBuffer, INT nSize)
@@ -2350,7 +2364,7 @@ INT CDECL X11DRV_GetKeyNameText(LONG lParam, LPWSTR lpBuffer, INT nSize)
/***********************************************************************
* X11DRV_KEYBOARD_MapDeadKeysym
*/
@ -216,7 +216,7 @@ index 4d113d8c184..b16d913a4a2 100644
{
switch (keysym)
{
@@ -2398,65 +2412,84 @@ static char KEYBOARD_MapDeadKeysym(KeySym keysym)
@@ -2360,65 +2374,84 @@ static char KEYBOARD_MapDeadKeysym(KeySym keysym)
#endif
case 0x1000FE7E : /* Xfree's XK_Dtilde */
return '~'; /* '? */
@ -316,7 +316,7 @@ index 4d113d8c184..b16d913a4a2 100644
*/
}
TRACE("no character for dead keysym 0x%08lx\n",keysym);
@@ -2641,7 +2674,7 @@ INT CDECL X11DRV_ToUnicodeEx(UINT virtKey, UINT scanCode, const BYTE *lpKeyState
@@ -2603,7 +2636,7 @@ INT CDECL X11DRV_ToUnicodeEx(UINT virtKey, UINT scanCode, const BYTE *lpKeyState
if (ret == 0)
{
@ -325,7 +325,7 @@ index 4d113d8c184..b16d913a4a2 100644
#ifdef XK_EuroSign
/* An ugly hack for EuroSign: X can't translate it to a character
@@ -2665,7 +2698,7 @@ INT CDECL X11DRV_ToUnicodeEx(UINT virtKey, UINT scanCode, const BYTE *lpKeyState
@@ -2627,7 +2660,7 @@ INT CDECL X11DRV_ToUnicodeEx(UINT virtKey, UINT scanCode, const BYTE *lpKeyState
dead_char = KEYBOARD_MapDeadKeysym(keysym);
if (dead_char)
{
@ -335,5 +335,5 @@ index 4d113d8c184..b16d913a4a2 100644
goto found;
}
--
2.24.0
2.24.1