[IMM32] Rewrite ImmGetCompositionWindow (#3820)

Rewrite ImmGetCompositionWindow function. CORE-11700
This commit is contained in:
Katayama Hirofumi MZ 2021-07-13 21:13:39 +09:00 committed by GitHub
parent 1558e6d0b3
commit 192981a1fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1849,15 +1849,23 @@ LONG WINAPI ImmGetCompositionStringW(
*/
BOOL WINAPI ImmGetCompositionWindow(HIMC hIMC, LPCOMPOSITIONFORM lpCompForm)
{
InputContextData *data = get_imc_data(hIMC);
LPINPUTCONTEXT pIC;
BOOL ret = FALSE;
TRACE("(%p, %p)\n", hIMC, lpCompForm);
TRACE("ImmGetCompositionWindow(%p, %p)\n", hIMC, lpCompForm);
if (!data)
pIC = ImmLockIMC(hIMC);
if (!pIC)
return FALSE;
*lpCompForm = data->IMC.cfCompForm;
return TRUE;
if (pIC->fdwInit & INIT_COMPFORM)
{
*lpCompForm = pIC->cfCompForm;
ret = TRUE;
}
ImmUnlockIMC(hIMC);
return ret;
}
/***********************************************************************