https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3965c9373297284e1986d…
commit 3965c9373297284e1986d11735d4a575e54e130f
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Fri Jul 16 07:30:55 2021 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Fri Jul 16 07:30:55 2021 +0900
[IMM32] Rewrite ImmGetStatusWindowPos (#3824)
Rewrite ImmGetStatusWindowPos function. CORE-11700
---
dll/win32/imm32/imm.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/dll/win32/imm32/imm.c b/dll/win32/imm32/imm.c
index e93c522d2d9..dc62b77bfd2 100644
--- a/dll/win32/imm32/imm.c
+++ b/dll/win32/imm32/imm.c
@@ -2369,16 +2369,21 @@ UINT WINAPI ImmGetRegisterWordStyleW(
*/
BOOL WINAPI ImmGetStatusWindowPos(HIMC hIMC, LPPOINT lpptPos)
{
- InputContextData *data = get_imc_data(hIMC);
+ LPINPUTCONTEXT pIC;
+ BOOL ret;
- TRACE("(%p, %p)\n", hIMC, lpptPos);
+ TRACE("ImmGetStatusWindowPos(%p, %p)\n", hIMC, lpptPos);
- if (!data || !lpptPos)
+ pIC = ImmLockIMC(hIMC);
+ if (pIC == NULL)
return FALSE;
- *lpptPos = data->IMC.ptStatusWndPos;
+ ret = !!(pIC->fdwInit & INIT_STATUSWNDPOS);
+ if (ret)
+ *lpptPos = pIC->ptStatusWndPos;
- return TRUE;
+ ImmUnlockIMC(hIMC);
+ return ret;
}
/***********************************************************************