ByeongSik Jeon : imm32: Reconstruct the ImmProcessKey, ImmTranslateMessage for the VK_PROCESSKEY.
Alexandre Julliard
julliard at winehq.org
Fri Apr 25 08:11:11 CDT 2008
Module: wine
Branch: master
Commit: 7e341002d228237bd00b4c7feabdbaa3d3389f2e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7e341002d228237bd00b4c7feabdbaa3d3389f2e
Author: ByeongSik Jeon <bsjeon at hanmail.net>
Date: Fri Apr 25 11:37:07 2008 +0900
imm32: Reconstruct the ImmProcessKey, ImmTranslateMessage for the VK_PROCESSKEY.
---
dlls/imm32/imm.c | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c
index 04b0d77..33f39cc 100644
--- a/dlls/imm32/imm.c
+++ b/dlls/imm32/imm.c
@@ -2239,7 +2239,7 @@ BOOL WINAPI ImmTranslateMessage(HWND hwnd, UINT msg, WCHAR chr, LPARAM lKeyData)
UINT uVirtKey;
static const int list_count = 10;
- TRACE("%p %x '%c' %x\n",hwnd, msg, chr, (UINT)lKeyData);
+ TRACE("%p %x %x %x\n",hwnd, msg, chr, (UINT)lKeyData);
if (imc)
data = (InputContextData*)imc;
@@ -2259,6 +2259,8 @@ BOOL WINAPI ImmTranslateMessage(HWND hwnd, UINT msg, WCHAR chr, LPARAM lKeyData)
{
if (!is_himc_ime_unicode(data))
ToAscii(data->lastVK, scancode, state, &chr, 0);
+ else
+ ToUnicodeEx(data->lastVK, scancode, state, &chr, 1, 0, GetKeyboardLayout(0));
uVirtKey = MAKELONG(data->lastVK,chr);
}
else
@@ -2279,6 +2281,8 @@ BOOL WINAPI ImmTranslateMessage(HWND hwnd, UINT msg, WCHAR chr, LPARAM lKeyData)
HeapFree(GetProcessHeap(),0,list);
+ data->lastVK = VK_PROCESSKEY;
+
return (msg_count > 0);
}
@@ -2303,17 +2307,12 @@ BOOL WINAPI ImmProcessKey(HWND hwnd, HKL hKL, UINT vKey, LPARAM lKeyData, DWORD
return FALSE;
GetKeyboardState(state);
- data->lastVK = vKey;
-
if (data->immKbd->pImeProcessKey(imc, vKey, lKeyData, state))
{
- WCHAR key;
- UINT scancode;
-
- scancode = lKeyData >> 0x10 & 0xff;
- ToUnicodeEx(vKey, scancode, state, &key, 1, 0, hKL);
- return ImmTranslateMessage(hwnd, WM_KEYDOWN, key, lKeyData );
+ data->lastVK = vKey;
+ return TRUE;
}
+ data->lastVK = VK_PROCESSKEY;
return FALSE;
}
More information about the wine-cvs
mailing list