https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fe8f80610e18179ed028a…
commit fe8f80610e18179ed028a119538724e04ac64e64
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Tue Aug 16 08:02:49 2022 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Tue Aug 16 08:02:49 2022 +0900
[NTUSER] Send WM_IME_SYSTEM:IMS_LOADTHREADLAYOUT at IntCreateWindow (#4606)
- Send WM_IME_SYSTEM:IMS_LOADTHREADLAYOUT message at IntCreateWindow function.
CORE-11700
---
win32ss/user/ntuser/window.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/win32ss/user/ntuser/window.c b/win32ss/user/ntuser/window.c
index b6a2c28bab2..a2b9e24b6d8 100644
--- a/win32ss/user/ntuser/window.c
+++ b/win32ss/user/ntuser/window.c
@@ -2053,17 +2053,22 @@ PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
PWND pwndDefaultIme = co_IntCreateDefaultImeWindow(pWnd, pWnd->hModule);
UserAssignmentLock((PVOID*)&(pti->spwndDefaultIme), pwndDefaultIme);
- if (pwndDefaultIme && (pti->pClientInfo->CI_flags &
CI_IMMACTIVATE))
+ if (pwndDefaultIme)
{
+ HWND hImeWnd;
USER_REFERENCE_ENTRY Ref;
- HKL hKL;
-
UserRefObjectCo(pwndDefaultIme, &Ref);
- hKL = pti->KeyboardLayout->hkl;
- co_IntSendMessage(UserHMGetHandle(pwndDefaultIme), WM_IME_SYSTEM,
- IMS_ACTIVATELAYOUT, (LPARAM)hKL);
- pti->pClientInfo->CI_flags &= ~CI_IMMACTIVATE;
+ hImeWnd = UserHMGetHandle(pwndDefaultIme);
+
+ co_IntSendMessage(hImeWnd, WM_IME_SYSTEM, IMS_LOADTHREADLAYOUT, 0);
+
+ if (pti->pClientInfo->CI_flags & CI_IMMACTIVATE)
+ {
+ HKL hKL = pti->KeyboardLayout->hkl;
+ co_IntSendMessage(hImeWnd, WM_IME_SYSTEM, IMS_ACTIVATELAYOUT, (LPARAM)hKL);
+ pti->pClientInfo->CI_flags &= ~CI_IMMACTIVATE;
+ }
UserDerefObjectCo(pwndDefaultIme);
}