imm: Send WM_IME_SELECT messages when IME is selected and deselected.

This commit is contained in:
Aric Stewart 2009-01-19 14:28:53 -06:00 committed by Alexandre Julliard
parent 633e069c67
commit e9b3209369
1 changed files with 2 additions and 0 deletions

View File

@ -656,6 +656,7 @@ HIMC WINAPI ImmCreateContext(void)
IMM_DestroyContext(new_context);
return 0;
}
SendMessageW(GetFocus(), WM_IME_SELECT, TRUE, (LPARAM)GetKeyboardLayout(0));
new_context->immKbd->uSelected++;
TRACE("Created context %p\n",new_context);
@ -673,6 +674,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));
if (IMM_GetThreadData()->hwndDefault == data->imeWnd)
IMM_GetThreadData()->hwndDefault = NULL;