From: Vijay Kiran Kamuju infyquest@gmail.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=28170 --- dlls/user32/input.c | 13 +++++++++++++ dlls/user32/tests/input.c | 24 ++++++++++++++++++++++++ dlls/user32/user32.spec | 2 +- 3 files changed, 38 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/input.c b/dlls/user32/input.c index 1fff29c7f87..2d2340b25e1 100644 --- a/dlls/user32/input.c +++ b/dlls/user32/input.c @@ -476,6 +476,19 @@ HKL WINAPI LoadKeyboardLayoutA(LPCSTR pwszKLID, UINT Flags) }
+/*********************************************************************** + * LoadKeyboardLayoutEx (USER32.@) + */ +HKL WINAPI LoadKeyboardLayoutEx( HKL layout, const WCHAR *name, UINT flags ) +{ + FIXME_(keyboard)( "layout %p, name %s, flags %x, semi-stub!\n", layout, debugstr_w( name ), flags ); + + if (!layout) + return NULL; + + return LoadKeyboardLayoutW(name, flags); +} + /*********************************************************************** * UnloadKeyboardLayout (USER32.@) */ diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index a78ea3b7c43..5157d251bd6 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -376,6 +376,7 @@ static UINT (WINAPI *pGetRawInputDeviceList) (PRAWINPUTDEVICELIST, PUINT, UINT); static UINT (WINAPI *pGetRawInputDeviceInfoW) (HANDLE, UINT, void *, UINT *); static UINT (WINAPI *pGetRawInputDeviceInfoA) (HANDLE, UINT, void *, UINT *); static BOOL (WINAPI *pIsWow64Process)(HANDLE, PBOOL); +static HKL (WINAPI *pLoadKeyboardLayoutEx)(HKL, const WCHAR *, UINT);
/**********************adapted from input.c **********************************/
@@ -401,6 +402,7 @@ static void init_function_pointers(void) GET_PROC(GetRawInputDeviceList); GET_PROC(GetRawInputDeviceInfoW); GET_PROC(GetRawInputDeviceInfoA); + GET_PROC(LoadKeyboardLayoutEx);
hdll = GetModuleHandleA("kernel32"); GET_PROC(IsWow64Process); @@ -5582,6 +5584,27 @@ static void test_keyboard_layout(void) } }
+static void test_keyboard_layoutex(void) +{ + HKL oldhkl, newhkl; + WCHAR oldlayoutname[64], layoutname[64]; + const WCHAR *newlayoutname = L"00000429"; + + oldhkl = GetKeyboardLayout(0); + GetKeyboardLayoutNameW(oldlayoutname); + + newhkl = pLoadKeyboardLayoutEx(NULL, newlayoutname, 0); + ok(!newhkl, "Got unexpected hkl.\n"); + + newhkl = pLoadKeyboardLayoutEx(oldhkl, newlayoutname, 0); + GetKeyboardLayoutNameW(layoutname); + ok(!wcscmp(newlayoutname, layoutname), "Expected : %s, Got : %s.\n", debugstr_w(newlayoutname), debugstr_w(layoutname)); + + oldhkl = pLoadKeyboardLayoutEx(newhkl, oldlayoutname, 0); + GetKeyboardLayoutNameW(layoutname); + ok(!wcscmp(oldlayoutname, layoutname), "Expected : %s, Got : %s.\n", debugstr_w(oldlayoutname), debugstr_w(layoutname)); +} + START_TEST(input) { char **argv; @@ -5614,6 +5637,7 @@ START_TEST(input) test_ToAscii(); test_get_async_key_state(); test_keyboard_layout(); + test_keyboard_layoutex(); test_keyboard_layout_name(); test_ActivateKeyboardLayout( argv ); test_key_names(); diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index 14246b3e3e0..21fa904082c 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -507,7 +507,7 @@ @ stdcall LoadImageA(long str long long long long) @ stdcall LoadImageW(long wstr long long long long) @ stdcall LoadKeyboardLayoutA(str long) -# @ stub LoadKeyboardLayoutEx +@ stdcall LoadKeyboardLayoutEx(long wstr long) @ stdcall LoadKeyboardLayoutW(wstr long) @ stdcall LoadLocalFonts() @ stdcall LoadMenuA(long str)
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=144226
Your paranoid android.
=== w11pro64 (32 bit report) ===
user32: input.c:3971: Test failed: layered 1: button_down_hwnd_todo 0: got MSG_TEST_WIN hwnd 000E01BC, msg WM_LBUTTONDOWN, wparam 0x1, lparam 0x320032 input.c:3971: Test failed: layered 1: button_down_hwnd_todo 1 (missing): MSG_TEST_WIN hwnd 000E01BC, WM_LBUTTONDOWN, wparam 0x1, lparam 0x320032
=== w10pro64_ar (64 bit report) ===
user32: input.c:3272: Test failed: 04010401 / 04010401: got change_hkl 0000000004010401
=== debian11 (32 bit report) ===
user32: input.c:5601: Test failed: Expected : L"00000429", Got : L"00000409".
=== debian11 (32 bit ar:MA report) ===
user32: input.c:5601: Test failed: Expected : L"00000429", Got : L"00001801".
=== debian11 (32 bit de report) ===
user32: input.c:5601: Test failed: Expected : L"00000429", Got : L"00000407".
=== debian11 (32 bit fr report) ===
user32: input.c:5601: Test failed: Expected : L"00000429", Got : L"0000040C".
=== debian11 (32 bit he:IL report) ===
user32: input.c:5601: Test failed: Expected : L"00000429", Got : L"0000040D".
=== debian11 (32 bit hi:IN report) ===
user32: input.c:5601: Test failed: Expected : L"00000429", Got : L"00000439".
=== debian11 (32 bit ja:JP report) ===
user32: input.c:5601: Test failed: Expected : L"00000429", Got : L"00000411".
=== debian11 (32 bit zh:CN report) ===
user32: input.c:3866: Test succeeded inside todo block: button_down_hwnd_todo 1: got MSG_TEST_WIN hwnd 00040096, msg WM_LBUTTONDOWN, wparam 0x1, lparam 0x320032 input.c:5601: Test failed: Expected : L"00000429", Got : L"00000804".
=== debian11b (32 bit WoW report) ===
user32: input.c:5601: Test failed: Expected : L"00000429", Got : L"00000409".
=== debian11b (64 bit WoW report) ===
user32: input.c:5601: Test failed: Expected : L"00000429", Got : L"00000409".
user32:win failures on windows 10 22h2 32 bit are not related to this patch.