Commit f4f589c4 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

imm32: Don't allow disabling other thread's IME by thread ID.

parent 0e763f72
......@@ -1022,7 +1022,7 @@ BOOL WINAPI ImmDisableIME(DWORD idThread)
DestroyWindow(to_destroy);
}
}
else
else if (!idThread || idThread == GetCurrentThreadId())
{
thread_data = IMM_GetThreadData(NULL, idThread);
if (!thread_data) return FALSE;
......@@ -1033,6 +1033,7 @@ BOOL WINAPI ImmDisableIME(DWORD idThread)
if (to_destroy)
DestroyWindow(to_destroy);
}
else return FALSE;
return TRUE;
}
......
......@@ -2377,7 +2377,6 @@ static DWORD WINAPI check_not_disabled_ime_thread(void *arg)
hwnd = CreateWindowA("static", "static", 0, 0, 0, 0, 0, 0, 0, 0, 0);
ok(hwnd != NULL, "CreateWindow failed\n");
def = ImmGetDefaultIMEWnd(hwnd);
todo_wine
ok(def != NULL, "ImmGetDefaultIMEWnd returned %p\n", def);
return 0;
}
......@@ -2403,7 +2402,6 @@ static void test_ImmDisableIME(void)
thread = CreateThread(NULL, 0, check_not_disabled_ime_thread, event, 0, &tid);
ok(thread != NULL, "CreateThread failed\n");
r = ImmDisableIME(tid);
todo_wine
ok(!r, "ImmDisableIME(tid) succeeded\n");
SetEvent(event);
WaitForSingleObject(thread, INFINITE);
......
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