https://git.reactos.org/?p=reactos.git;a=commitdiff;h=192981a1feb30e6f7e9dcd...
commit 192981a1feb30e6f7e9dcde7a8b55e8e544e0cf7 Author: Katayama Hirofumi MZ katayama.hirofumi.mz@gmail.com AuthorDate: Tue Jul 13 21:13:39 2021 +0900 Commit: GitHub noreply@github.com CommitDate: Tue Jul 13 21:13:39 2021 +0900
[IMM32] Rewrite ImmGetCompositionWindow (#3820)
Rewrite ImmGetCompositionWindow function. CORE-11700 --- dll/win32/imm32/imm.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/dll/win32/imm32/imm.c b/dll/win32/imm32/imm.c index 5030f593461..e68f59c35a1 100644 --- a/dll/win32/imm32/imm.c +++ b/dll/win32/imm32/imm.c @@ -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; }
/***********************************************************************