Commit 2fa0c66c authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Always generate unicode CHAR messages.

parent bd14f66e
...@@ -2187,7 +2187,7 @@ static BOOL MSG_DoTranslateMessage( UINT message, HWND hwnd, ...@@ -2187,7 +2187,7 @@ static BOOL MSG_DoTranslateMessage( UINT message, HWND hwnd,
WPARAM wParam, LPARAM lParam ) WPARAM wParam, LPARAM lParam )
{ {
static int dead_char; static int dead_char;
BYTE wp[2]; WCHAR wp[2];
if (message != WM_MOUSEMOVE && message != WM_TIMER) if (message != WM_MOUSEMOVE && message != WM_TIMER)
TRACE("(%s, %04X, %08lX)\n", TRACE("(%s, %04X, %08lX)\n",
...@@ -2201,9 +2201,8 @@ static BOOL MSG_DoTranslateMessage( UINT message, HWND hwnd, ...@@ -2201,9 +2201,8 @@ static BOOL MSG_DoTranslateMessage( UINT message, HWND hwnd,
TRACE_(key)("Translating key %s (%04x), scancode %02x\n", TRACE_(key)("Translating key %s (%04x), scancode %02x\n",
SPY_GetVKeyName(wParam), wParam, LOBYTE(HIWORD(lParam))); SPY_GetVKeyName(wParam), wParam, LOBYTE(HIWORD(lParam)));
/* FIXME : should handle ToAscii yielding 2 */ /* FIXME : should handle ToUnicode yielding 2 */
switch (ToAscii(wParam, HIWORD(lParam), switch (ToUnicode(wParam, HIWORD(lParam), QueueKeyStateTable, wp, 2, 0))
QueueKeyStateTable,(LPWORD)wp, 0))
{ {
case 1 : case 1 :
message = (message == WM_KEYDOWN) ? WM_CHAR : WM_SYSCHAR; message = (message == WM_KEYDOWN) ? WM_CHAR : WM_SYSCHAR;
...@@ -2230,15 +2229,14 @@ static BOOL MSG_DoTranslateMessage( UINT message, HWND hwnd, ...@@ -2230,15 +2229,14 @@ static BOOL MSG_DoTranslateMessage( UINT message, HWND hwnd,
dead_char = 0; dead_char = 0;
} }
TRACE_(key)("1 -> PostMessage(%s)\n", SPY_GetMsgName(message)); TRACE_(key)("1 -> PostMessage(%s)\n", SPY_GetMsgName(message));
PostMessage16( hwnd, message, wp[0], lParam ); PostMessageW( hwnd, message, wp[0], lParam );
return TRUE; return TRUE;
case -1 : case -1 :
message = (message == WM_KEYDOWN) ? WM_DEADCHAR : WM_SYSDEADCHAR; message = (message == WM_KEYDOWN) ? WM_DEADCHAR : WM_SYSDEADCHAR;
dead_char = wp[0]; dead_char = wp[0];
TRACE_(key)("-1 -> PostMessage(%s)\n", TRACE_(key)("-1 -> PostMessage(%s)\n", SPY_GetMsgName(message));
SPY_GetMsgName(message)); PostMessageW( hwnd, message, wp[0], lParam );
PostMessage16( hwnd, message, wp[0], lParam );
return TRUE; return TRUE;
} }
return FALSE; return FALSE;
......
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