[IMM32] Minor fix of ImmSetCompositionWindow

CORE-11700
This commit is contained in:
Katayama Hirofumi MZ 2022-10-21 11:29:47 +09:00
parent b086f910d8
commit 2865423abe

View file

@ -1468,19 +1468,24 @@ BOOL WINAPI ImmGetCompositionWindow(HIMC hIMC, LPCOMPOSITIONFORM lpCompForm)
*/
BOOL WINAPI ImmSetCompositionWindow(HIMC hIMC, LPCOMPOSITIONFORM lpCompForm)
{
LPINPUTCONTEXT pIC;
LPINPUTCONTEXTDX pIC;
HWND hWnd;
if (Imm32IsCrossThreadAccess(hIMC))
return FALSE;
pIC = ImmLockIMC(hIMC);
pIC = (LPINPUTCONTEXTDX)ImmLockIMC(hIMC);
if (pIC == NULL)
return FALSE;
pIC->cfCompForm = *lpCompForm;
pIC->fdwInit |= INIT_COMPFORM;
if (pIC->dwUIFlags & 0x8)
pIC->dwUIFlags &= ~0x8;
else
pIC->dwUIFlags &= ~0x2;
hWnd = pIC->hWnd;
ImmUnlockIMC(hIMC);