Commit c82aa505 authored by Austin Lund's avatar Austin Lund Committed by Alexandre Julliard

user32/tests: Fix test failures by disabling IME when testing unicode input.

parent 5d95857c
...@@ -1139,6 +1139,8 @@ static void test_Input_unicode(void) ...@@ -1139,6 +1139,8 @@ static void test_Input_unicode(void)
WNDCLASSW wclass; WNDCLASSW wclass;
HANDLE hInstance = GetModuleHandleW(NULL); HANDLE hInstance = GetModuleHandleW(NULL);
HHOOK hook; HHOOK hook;
HMODULE hModuleImm32;
BOOL (WINAPI *pImmDisableIME)(DWORD);
wclass.lpszClassName = classNameW; wclass.lpszClassName = classNameW;
wclass.style = CS_HREDRAW | CS_VREDRAW; wclass.style = CS_HREDRAW | CS_VREDRAW;
...@@ -1154,6 +1156,16 @@ static void test_Input_unicode(void) ...@@ -1154,6 +1156,16 @@ static void test_Input_unicode(void)
win_skip("Unicode functions not supported\n"); win_skip("Unicode functions not supported\n");
return; return;
} }
hModuleImm32 = LoadLibrary("imm32.dll");
if (hModuleImm32) {
pImmDisableIME = (void *)GetProcAddress(hModuleImm32, "ImmDisableIME");
if (pImmDisableIME)
pImmDisableIME(0);
}
pImmDisableIME = NULL;
FreeLibrary(hModuleImm32);
/* create the test window that will receive the keystrokes */ /* create the test window that will receive the keystrokes */
hWndTest = CreateWindowW(wclass.lpszClassName, windowNameW, hWndTest = CreateWindowW(wclass.lpszClassName, windowNameW,
WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, 100, 100, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, 100, 100,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment