user32: WM_IME_CHAR should result in posted, not sent, WM_CHAR messages.

This commit is contained in:
Alexandre Julliard 2007-08-09 13:14:20 +02:00
parent 2ce799c4f6
commit c7b1b4c68b
1 changed files with 6 additions and 11 deletions

View File

@ -812,20 +812,15 @@ LRESULT WINAPI DefWindowProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam
result = 1; /* success. FIXME: check text length */ result = 1; /* success. FIXME: check text length */
break; break;
/* for far east users (IMM32) - <hidenori@a2.ctktv.ne.jp> */
case WM_IME_CHAR: case WM_IME_CHAR:
{ if (HIBYTE(wParam)) PostMessageA( hwnd, WM_CHAR, HIBYTE(wParam), lParam );
CHAR chChar1 = (CHAR)( (wParam>>8) & 0xff ); PostMessageA( hwnd, WM_CHAR, LOBYTE(wParam), lParam );
CHAR chChar2 = (CHAR)( wParam & 0xff );
if (chChar1)
SendMessageA( hwnd, WM_CHAR, (WPARAM)chChar1, lParam );
SendMessageA( hwnd, WM_CHAR, (WPARAM)chChar2, lParam );
}
break; break;
case WM_IME_KEYDOWN: case WM_IME_KEYDOWN:
result = SendMessageA( hwnd, WM_KEYDOWN, wParam, lParam ); result = SendMessageA( hwnd, WM_KEYDOWN, wParam, lParam );
break; break;
case WM_IME_KEYUP: case WM_IME_KEYUP:
result = SendMessageA( hwnd, WM_KEYUP, wParam, lParam ); result = SendMessageA( hwnd, WM_KEYUP, wParam, lParam );
break; break;
@ -968,10 +963,10 @@ LRESULT WINAPI DefWindowProcW(
result = 1; /* success. FIXME: check text length */ result = 1; /* success. FIXME: check text length */
break; break;
/* for far east users (IMM32) - <hidenori@a2.ctktv.ne.jp> */
case WM_IME_CHAR: case WM_IME_CHAR:
SendMessageW( hwnd, WM_CHAR, wParam, lParam ); PostMessageW( hwnd, WM_CHAR, wParam, lParam );
break; break;
case WM_IME_SETCONTEXT: case WM_IME_SETCONTEXT:
{ {
HWND hwndIME; HWND hwndIME;