From a8fe27488ffcfd3dfa5da212e9a6d9c473bf1994 Mon Sep 17 00:00:00 2001 From: qiannian Date: Wed, 17 Jun 2026 14:47:43 +0800 Subject: [PATCH] app: [Windows] avoid default IME composition window Mark WM_IME_STARTCOMPOSITION as handled after positioning the IME composition and candidate windows. Passing the message on to DefWindowProc can let Windows create its default composition window, which shows the first composing character below Gio's caret. Fixes: https://todo.sr.ht/~eliasnaur/gio/687 Signed-off-by: qiannian --- app/os_windows.go | 1 + 1 file changed, 1 insertion(+) diff --git a/app/os_windows.go b/app/os_windows.go index 84261e67..d2098305 100644 --- a/app/os_windows.go +++ b/app/os_windows.go @@ -412,6 +412,7 @@ func windowProc(hwnd syscall.Handle, msg uint32, wParam, lParam uintptr) uintptr icaret := image.Pt(int(caret.X+.5), int(caret.Y+.5)) windows.ImmSetCompositionWindow(imc, icaret.X, icaret.Y) windows.ImmSetCandidateWindow(imc, icaret.X, icaret.Y) + return windows.TRUE case windows.WM_IME_COMPOSITION: imc := windows.ImmGetContext(w.hwnd) if imc == 0 {