From: Alex Kwak Subject: [PATCH v2] winex11.drv: call XIMReset on CPS_COMPLETE Message-Id: <20220331032207.8349-1-take-me-home@kakao.com> Date: Thu, 31 Mar 2022 12:22:07 +0900 The composition on the IME message is end, but the XIM string is in-composition state, and the same string remains on the XIM afterwards. so, call X11DRV_ForceXIMReset and finish composition state in the XIM. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52754 Signed-off-by: Alex Kwak --- v2: When XmbResetIC is called and KeyEvent occurs, it is a problem with some IME (i.e., ibus-hangul). --- dlls/winex11.drv/ime.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/winex11.drv/ime.c b/dlls/winex11.drv/ime.c index c1584930861..f44b50550ec 100644 --- a/dlls/winex11.drv/ime.c +++ b/dlls/winex11.drv/ime.c @@ -704,6 +704,7 @@ BOOL WINAPI NotifyIME(HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue) { case CPS_COMPLETE: { + HWND hwnd; HIMCC newCompStr; DWORD cplen = 0; LPWSTR cpstr; @@ -753,6 +754,12 @@ BOOL WINAPI NotifyIME(HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue) myPrivate->bInComposition = FALSE; ImmUnlockIMCC(lpIMC->hPrivate); + hwnd = GetActiveWindow(); + if (hwnd) + { + X11DRV_ForceXIMReset(hwnd); + } + bRet = TRUE; } break; -- 2.32.0