You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Rebase against 1a7b256f7c69c50c2a216317e03f9caeb268d0af.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
From 7595b344c4fc7d03f07a163b3f2f0b38123f7264 Mon Sep 17 00:00:00 2001
|
||||
From 5a1737e74415871fd5b0646ece31f191fa74bb69 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 9 Jul 2019 14:13:28 +1000
|
||||
Subject: [PATCH] user32: Improve GetKeyboardLayoutList
|
||||
@ -6,15 +6,15 @@ Subject: [PATCH] user32: Improve GetKeyboardLayoutList
|
||||
This function returns the current list of *installed* Keyboard layouts
|
||||
not the complete list from the registry.
|
||||
---
|
||||
dlls/user32/driver.c | 27 ---------------------------
|
||||
dlls/user32/driver.c | 26 --------------------------
|
||||
dlls/user32/tests/input.c | 35 +++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 35 insertions(+), 27 deletions(-)
|
||||
2 files changed, 35 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/dlls/user32/driver.c b/dlls/user32/driver.c
|
||||
index 6d916c7d65d..b9e0dc60e7c 100644
|
||||
index 8ff6b0a817e..ddf00cfd7b5 100644
|
||||
--- a/dlls/user32/driver.c
|
||||
+++ b/dlls/user32/driver.c
|
||||
@@ -210,12 +210,9 @@ static void CDECL nulldrv_Beep(void)
|
||||
@@ -198,8 +198,6 @@ static void CDECL nulldrv_Beep(void)
|
||||
|
||||
static UINT CDECL nulldrv_GetKeyboardLayoutList( INT size, HKL *layouts )
|
||||
{
|
||||
@ -23,16 +23,12 @@ index 6d916c7d65d..b9e0dc60e7c 100644
|
||||
INT count = 0;
|
||||
ULONG_PTR baselayout;
|
||||
LANGID langid;
|
||||
- static const WCHAR szKeyboardReg[] = {'S','y','s','t','e','m','\\','C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\','C','o','n','t','r','o','l','\\','K','e','y','b','o','a','r','d',' ','L','a','y','o','u','t','s',0};
|
||||
|
||||
baselayout = GetUserDefaultLCID();
|
||||
langid = PRIMARYLANGID(LANGIDFROMLCID(baselayout));
|
||||
@@ -224,30 +221,6 @@ static UINT CDECL nulldrv_GetKeyboardLayoutList( INT size, HKL *layouts )
|
||||
@@ -211,30 +209,6 @@ static UINT CDECL nulldrv_GetKeyboardLayoutList( INT size, HKL *layouts )
|
||||
else
|
||||
baselayout |= baselayout << 16;
|
||||
|
||||
- /* Enumerate the Registry */
|
||||
- rc = RegOpenKeyW(HKEY_LOCAL_MACHINE,szKeyboardReg,&hKeyKeyboard);
|
||||
- rc = RegOpenKeyW(HKEY_LOCAL_MACHINE,L"System\\CurrentControlSet\\Control\\Keyboard Layouts",&hKeyKeyboard);
|
||||
- if (rc == ERROR_SUCCESS)
|
||||
- {
|
||||
- do {
|
||||
@ -41,7 +37,7 @@ index 6d916c7d65d..b9e0dc60e7c 100644
|
||||
- rc = RegEnumKeyW(hKeyKeyboard, count, szKeyName, 9);
|
||||
- if (rc == ERROR_SUCCESS)
|
||||
- {
|
||||
- layout = (HKL)(ULONG_PTR)strtoulW(szKeyName,NULL,16);
|
||||
- layout = (HKL)(ULONG_PTR)wcstoul(szKeyName,NULL,16);
|
||||
- if (baselayout != 0 && layout == (HKL)baselayout)
|
||||
- baselayout = 0; /* found in the registry do not add again */
|
||||
- if (size && layouts)
|
||||
@ -59,10 +55,10 @@ index 6d916c7d65d..b9e0dc60e7c 100644
|
||||
if (baselayout != 0)
|
||||
{
|
||||
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
|
||||
index bab0fd97536..ea0cac6d18a 100644
|
||||
index 1809c147cbd..fd8f26e9ee4 100644
|
||||
--- a/dlls/user32/tests/input.c
|
||||
+++ b/dlls/user32/tests/input.c
|
||||
@@ -3706,6 +3706,40 @@ static void test_UnregisterDeviceNotification(void)
|
||||
@@ -3791,6 +3791,40 @@ static void test_UnregisterDeviceNotification(void)
|
||||
ok(ret == FALSE, "Unregistering NULL Device Notification returned: %d\n", ret);
|
||||
}
|
||||
|
||||
@ -103,7 +99,7 @@ index bab0fd97536..ea0cac6d18a 100644
|
||||
START_TEST(input)
|
||||
{
|
||||
char **argv;
|
||||
@@ -3741,6 +3775,7 @@ START_TEST(input)
|
||||
@@ -3826,6 +3860,7 @@ START_TEST(input)
|
||||
test_GetRawInputBuffer();
|
||||
test_RegisterRawInputDevices();
|
||||
test_rawinput(argv[0]);
|
||||
@ -112,5 +108,5 @@ index bab0fd97536..ea0cac6d18a 100644
|
||||
if(pGetMouseMovePointsEx)
|
||||
test_GetMouseMovePointsEx();
|
||||
--
|
||||
2.27.0
|
||||
2.28.0
|
||||
|
||||
|
Reference in New Issue
Block a user