Commit 0ad36379 authored by Vitaly Lipatov's avatar Vitaly Lipatov

commit 13.1.3 upon wine-1.7.4

parent 0327f405
......@@ -769,25 +769,22 @@ HIMC WINAPI ImmCreateContext(void)
static BOOL IMM_DestroyContext(HIMC hIMC)
{
InputContextData *data = get_imc_data(hIMC);
IMMThreadData *tdata;
TRACE("Destroying %p\n",hIMC);
if (data)
{
IMMThreadData *tdata;
data->immKbd->uSelected --;
data->immKbd->pImeSelect(hIMC, FALSE);
if (data->IMC.hWnd)
SendMessageW(data->IMC.hWnd, WM_IME_SELECT, FALSE, (LPARAM)GetKeyboardLayout(0));
tdata = IMM_IsDefaultContext(hIMC);
if (tdata)
tdata->hwndDefault = NULL;
LeaveCriticalSection(&threaddata_cs);
if (!data)
return FALSE;
data->immKbd->uSelected --;
data->immKbd->pImeSelect(hIMC, FALSE);
SendMessageW(data->IMC.hWnd, WM_IME_SELECT, FALSE, (LPARAM)GetKeyboardLayout(0));
if (data->IMC.hWnd)
SendMessageW(data->IMC.hWnd, WM_IME_SELECT, FALSE, (LPARAM)GetKeyboardLayout(0));
tdata = IMM_IsDefaultContext(hIMC);
if (tdata)
tdata->hwndDefault = NULL;
LeaveCriticalSection(&threaddata_cs);
ImmDestroyIMCC(data->IMC.hCompStr);
ImmDestroyIMCC(data->IMC.hCandInfo);
......@@ -798,12 +795,11 @@ static BOOL IMM_DestroyContext(HIMC hIMC)
data->magic = 0;
HeapFree(GetProcessHeap(),0,data);
HeapFree(GetProcessHeap(),0,data);
EnterCriticalSection(&threaddata_cs);
if (tdata)
tdata->defaultContext = NULL;
LeaveCriticalSection(&threaddata_cs);
}
EnterCriticalSection(&threaddata_cs);
if (tdata)
tdata->defaultContext = NULL;
LeaveCriticalSection(&threaddata_cs);
return TRUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment