Skip to content

Commit 3965c93

Browse files
authored
[IMM32] Rewrite ImmGetStatusWindowPos (reactos#3824)
Rewrite ImmGetStatusWindowPos function. CORE-11700
1 parent 0966e32 commit 3965c93

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

dll/win32/imm32/imm.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2369,16 +2369,21 @@ UINT WINAPI ImmGetRegisterWordStyleW(
23692369
*/
23702370
BOOL WINAPI ImmGetStatusWindowPos(HIMC hIMC, LPPOINT lpptPos)
23712371
{
2372-
InputContextData *data = get_imc_data(hIMC);
2372+
LPINPUTCONTEXT pIC;
2373+
BOOL ret;
23732374

2374-
TRACE("(%p, %p)\n", hIMC, lpptPos);
2375+
TRACE("ImmGetStatusWindowPos(%p, %p)\n", hIMC, lpptPos);
23752376

2376-
if (!data || !lpptPos)
2377+
pIC = ImmLockIMC(hIMC);
2378+
if (pIC == NULL)
23772379
return FALSE;
23782380

2379-
*lpptPos = data->IMC.ptStatusWndPos;
2381+
ret = !!(pIC->fdwInit & INIT_STATUSWNDPOS);
2382+
if (ret)
2383+
*lpptPos = pIC->ptStatusWndPos;
23802384

2381-
return TRUE;
2385+
ImmUnlockIMC(hIMC);
2386+
return ret;
23822387
}
23832388

23842389
/***********************************************************************

0 commit comments

Comments
 (0)