mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[IMM32] Implement CtfImmTIMCreateInputContext
CORE-19268
This commit is contained in:
parent
9d0b6f3185
commit
90e17817fe
1 changed files with 45 additions and 1 deletions
|
@ -410,8 +410,52 @@ HRESULT
|
|||
CtfImmTIMCreateInputContext(
|
||||
_In_ HIMC hIMC)
|
||||
{
|
||||
PCLIENTIMC pClientImc;
|
||||
DWORD_PTR dwImeThreadId, dwCurrentThreadId;
|
||||
HRESULT hr = S_FALSE;
|
||||
|
||||
TRACE("(%p)\n", hIMC);
|
||||
return E_NOTIMPL;
|
||||
|
||||
pClientImc = ImmLockClientImc(hIMC);
|
||||
if (!pClientImc)
|
||||
return E_FAIL;
|
||||
|
||||
if (GetWin32ClientInfo()->CI_flags & CI_AIMMACTIVATED)
|
||||
{
|
||||
if (!pClientImc->bUnknown4)
|
||||
{
|
||||
dwImeThreadId = NtUserQueryInputContext(hIMC, QIC_INPUTTHREADID);
|
||||
dwCurrentThreadId = GetCurrentThreadId();
|
||||
if (dwImeThreadId == dwCurrentThreadId)
|
||||
{
|
||||
pClientImc->bUnknown4 = 1;
|
||||
hr = CtfImeCreateInputContext(hIMC);
|
||||
if (FAILED(hr))
|
||||
pClientImc->bUnknown4 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(GetWin32ClientInfo()->CI_flags & 0x100))
|
||||
return S_OK;
|
||||
|
||||
if (!pClientImc->bUnknown4)
|
||||
{
|
||||
dwImeThreadId = NtUserQueryInputContext(hIMC, QIC_INPUTTHREADID);
|
||||
dwCurrentThreadId = GetCurrentThreadId();
|
||||
if ((dwImeThreadId == dwCurrentThreadId) && IS_CICERO_MODE() && !IS_16BIT_MODE())
|
||||
{
|
||||
pClientImc->bUnknown4 = 1;
|
||||
hr = CtfImeCreateInputContext(hIMC);
|
||||
if (FAILED(hr))
|
||||
pClientImc->bUnknown4 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ImmUnlockClientImc(pClientImc);
|
||||
return hr;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
Loading…
Reference in a new issue