Aric Stewart : user32: Call ImmProcessKey in TranslateMessage to allow IMEs to handle key processing if they choose to .
Alexandre Julliard
julliard at winehq.org
Mon Apr 14 17:20:54 CDT 2008
Module: wine
Branch: master
Commit: f51542d9b5c3601dfc3266706a98f996cf909e2d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f51542d9b5c3601dfc3266706a98f996cf909e2d
Author: Aric Stewart <aric at codeweavers.com>
Date: Mon Apr 14 12:39:28 2008 -0500
user32: Call ImmProcessKey in TranslateMessage to allow IMEs to handle key processing if they choose to.
---
dlls/user32/message.c | 4 ++++
include/imm.h | 1 +
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/dlls/user32/message.c b/dlls/user32/message.c
index 33c12c1..7f3407e 100644
--- a/dlls/user32/message.c
+++ b/dlls/user32/message.c
@@ -35,6 +35,7 @@
#include "winnls.h"
#include "dbt.h"
#include "dde.h"
+#include "imm.h"
#include "wine/unicode.h"
#include "wine/server.h"
#include "user_private.h"
@@ -2994,6 +2995,9 @@ BOOL WINAPI TranslateMessage( const MSG *msg )
TRACE_(key)("Translating key %s (%04lx), scancode %02x\n",
SPY_GetVKeyName(msg->wParam), msg->wParam, LOBYTE(HIWORD(msg->lParam)));
+ if (ImmProcessKey(msg->hwnd, GetKeyboardLayout(0), msg->wParam, msg->lParam,0))
+ return TRUE;
+
GetKeyboardState( state );
/* FIXME : should handle ToUnicode yielding 2 */
switch (ToUnicode(msg->wParam, HIWORD(msg->lParam), state, wp, 2, 0))
diff --git a/include/imm.h b/include/imm.h
index 85848e6..1b4cc71 100644
--- a/include/imm.h
+++ b/include/imm.h
@@ -538,6 +538,7 @@ BOOL WINAPI ImmIsUIMessageA(HWND, UINT, WPARAM, LPARAM);
BOOL WINAPI ImmIsUIMessageW(HWND, UINT, WPARAM, LPARAM);
#define ImmIsUIMessage WINELIB_NAME_AW(ImmIsUIMessage)
BOOL WINAPI ImmNotifyIME(HIMC, DWORD, DWORD, DWORD);
+BOOL WINAPI ImmProcessKey(HWND, HKL, UINT, LPARAM, DWORD);
BOOL WINAPI ImmRegisterWordA(HKL, LPCSTR, DWORD, LPCSTR);
BOOL WINAPI ImmRegisterWordW(HKL, LPCWSTR, DWORD, LPCWSTR);
#define ImmRegisterWord WINELIB_NAME_AW(ImmRegisterWord)
More information about the wine-cvs
mailing list