imm32: Handle keyboard changes when processing input.

This commit is contained in:
Aric Stewart 2014-10-28 13:03:33 -05:00 committed by Alexandre Julliard
parent 6df5ce7c9e
commit 836bd1fdae
1 changed files with 16 additions and 0 deletions

View File

@ -2882,6 +2882,22 @@ BOOL WINAPI ImmProcessKey(HWND hwnd, HKL hKL, UINT vKey, LPARAM lKeyData, DWORD
else else
return FALSE; return FALSE;
/* Make sure we are inputting to the correct keyboard */
if (data->immKbd->hkl != hKL)
{
ImmHkl *new_hkl = IMM_GetImmHkl(hKL);
if (new_hkl)
{
data->immKbd->pImeSelect(imc, FALSE);
data->immKbd->uSelected--;
data->immKbd = new_hkl;
data->immKbd->pImeSelect(imc, TRUE);
data->immKbd->uSelected++;
}
else
return FALSE;
}
if (!data->immKbd->hIME || !data->immKbd->pImeProcessKey) if (!data->immKbd->hIME || !data->immKbd->pImeProcessKey)
return FALSE; return FALSE;