mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-07 05:24:06 +00:00
imm32: Don't allow disabling other thread's IME by thread ID.
This commit is contained in:
parent
0e763f72a6
commit
f4f589c421
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue