From c7b1b4c68bdcabe76a3de5672b33d24a6cbabe26 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 9 Aug 2007 13:14:20 +0200 Subject: [PATCH] user32: WM_IME_CHAR should result in posted, not sent, WM_CHAR messages. --- dlls/user32/defwnd.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c index 489f7201a98..6f97880be34 100644 --- a/dlls/user32/defwnd.c +++ b/dlls/user32/defwnd.c @@ -812,20 +812,15 @@ LRESULT WINAPI DefWindowProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam result = 1; /* success. FIXME: check text length */ break; - /* for far east users (IMM32) - */ case WM_IME_CHAR: - { - CHAR chChar1 = (CHAR)( (wParam>>8) & 0xff ); - CHAR chChar2 = (CHAR)( wParam & 0xff ); - - if (chChar1) - SendMessageA( hwnd, WM_CHAR, (WPARAM)chChar1, lParam ); - SendMessageA( hwnd, WM_CHAR, (WPARAM)chChar2, lParam ); - } + if (HIBYTE(wParam)) PostMessageA( hwnd, WM_CHAR, HIBYTE(wParam), lParam ); + PostMessageA( hwnd, WM_CHAR, LOBYTE(wParam), lParam ); break; + case WM_IME_KEYDOWN: result = SendMessageA( hwnd, WM_KEYDOWN, wParam, lParam ); break; + case WM_IME_KEYUP: result = SendMessageA( hwnd, WM_KEYUP, wParam, lParam ); break; @@ -968,10 +963,10 @@ LRESULT WINAPI DefWindowProcW( result = 1; /* success. FIXME: check text length */ break; - /* for far east users (IMM32) - */ case WM_IME_CHAR: - SendMessageW( hwnd, WM_CHAR, wParam, lParam ); + PostMessageW( hwnd, WM_CHAR, wParam, lParam ); break; + case WM_IME_SETCONTEXT: { HWND hwndIME;