mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[IMM32] Rewrite ImmNotifyIME (#3853)
Implementing Japanese input... CORE-11700
This commit is contained in:
parent
a71de262d3
commit
fb2aef9e4e
1 changed files with 16 additions and 10 deletions
|
@ -2609,23 +2609,29 @@ BOOL WINAPI ImmIsUIMessageW(
|
|||
BOOL WINAPI ImmNotifyIME(
|
||||
HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue)
|
||||
{
|
||||
InputContextData *data = get_imc_data(hIMC);
|
||||
DWORD dwImeThreadId, dwThreadId;
|
||||
HKL hKL;
|
||||
PIMEDPI pImeDpi;
|
||||
BOOL ret;
|
||||
|
||||
TRACE("(%p, %d, %d, %d)\n",
|
||||
hIMC, dwAction, dwIndex, dwValue);
|
||||
TRACE("ImmNotifyIME(%p, %lu, %lu, %lu)\n", hIMC, dwAction, dwIndex, dwValue);
|
||||
|
||||
if (hIMC == NULL)
|
||||
if (hIMC)
|
||||
{
|
||||
SetLastError(ERROR_SUCCESS);
|
||||
return FALSE;
|
||||
dwImeThreadId = Imm32QueryWindow(hIMC, QUERY_WINDOW_UNIQUE_THREAD_ID);
|
||||
dwThreadId = GetCurrentThreadId();
|
||||
if (dwImeThreadId != dwThreadId)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!data || ! data->immKbd->pNotifyIME)
|
||||
{
|
||||
hKL = GetKeyboardLayout(0);
|
||||
pImeDpi = ImmLockImeDpi(hKL);
|
||||
if (pImeDpi == NULL)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return data->immKbd->pNotifyIME(hIMC,dwAction,dwIndex,dwValue);
|
||||
ret = pImeDpi->NotifyIME(hIMC, dwAction, dwIndex, dwValue);
|
||||
ImmUnlockImeDpi(pImeDpi);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
Loading…
Reference in a new issue