From ac9c3ef5aae3f769ec2e92929359c7e30c5a8db1 Mon Sep 17 00:00:00 2001 From: Zhiyi Zhang Date: Fri, 12 Aug 2022 11:32:54 +0800 Subject: [PATCH] user32/edit: Let DefWindowProcA/W() handle WM_IME_CHAR. So that WM_IME_CHAR will be converted to WM_CHAR in DefWindowProcA/W(). Signed-off-by: Zhiyi Zhang --- dlls/user32/edit.c | 14 -------------- dlls/user32/tests/msg.c | 4 ++-- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index bee158586b9..6593ee6dce2 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -4976,20 +4976,6 @@ LRESULT EditWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, B } break; - case WM_IME_CHAR: - if (!unicode) - { - WCHAR charW; - CHAR strng[2]; - - strng[0] = wParam >> 8; - strng[1] = wParam & 0xff; - if (strng[0]) MultiByteToWideChar(CP_ACP, 0, strng, 2, &charW, 1); - else MultiByteToWideChar(CP_ACP, 0, &strng[1], 1, &charW, 1); - result = EDIT_WM_Char(es, charW); - break; - } - /* fall through */ case WM_CHAR: { WCHAR charW; diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index adda16a0f3b..2d43c1ad1aa 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -12271,7 +12271,7 @@ static DWORD WINAPI test_edit_ime_messages(void *unused_arg) flush_sequence(); SendMessageA(hwnd, WM_IME_CHAR, '0', 1); while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg); - ok_sequence(edit_wm_ime_char_seq, "WM_IME_CHAR", TRUE); + ok_sequence(edit_wm_ime_char_seq, "WM_IME_CHAR", FALSE); /* Test IME messages when EIMES_GETCOMPSTRATONCE is set */ lr = SendMessageA(hwnd, EM_SETIMESTATUS, EMSIS_COMPOSITIONSTRING, EIMES_GETCOMPSTRATONCE); @@ -12292,7 +12292,7 @@ static DWORD WINAPI test_edit_ime_messages(void *unused_arg) flush_sequence(); SendMessageA(hwnd, WM_IME_CHAR, '0', 1); while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg); - ok_sequence(edit_wm_ime_char_seq, "WM_IME_CHAR", TRUE); + ok_sequence(edit_wm_ime_char_seq, "WM_IME_CHAR", FALSE); ImmReleaseContext(hwnd, himc); DestroyWindow(hwnd); -- 2.11.4.GIT