imm32: Use IMM context keyboard layout when possible.

This commit is contained in:
Piotr Caban 2015-08-11 20:45:31 +02:00 committed by Alexandre Julliard
parent 18d9ca872a
commit 9e09982847
1 changed files with 2 additions and 2 deletions

View File

@ -763,7 +763,7 @@ HIMC WINAPI ImmCreateContext(void)
return 0;
}
new_context->threadID = GetCurrentThreadId();
SendMessageW(GetFocus(), WM_IME_SELECT, TRUE, (LPARAM)GetKeyboardLayout(0));
SendMessageW(GetFocus(), WM_IME_SELECT, TRUE, (LPARAM)new_context->immKbd);
new_context->immKbd->uSelected++;
TRACE("Created context %p\n",new_context);
@ -783,7 +783,7 @@ static BOOL IMM_DestroyContext(HIMC hIMC)
data->immKbd->uSelected --;
data->immKbd->pImeSelect(hIMC, FALSE);
SendMessageW(data->IMC.hWnd, WM_IME_SELECT, FALSE, (LPARAM)GetKeyboardLayout(0));
SendMessageW(data->IMC.hWnd, WM_IME_SELECT, FALSE, (LPARAM)data->immKbd);
ImmDestroyIMCC(data->IMC.hCompStr);
ImmDestroyIMCC(data->IMC.hCandInfo);