exp/textinput: bug fix: handle WM_IME_ENDCOMPOSITION

Closes #3388
This commit is contained in:
Hajime Hoshi
2026-02-14 21:51:51 +09:00
parent 1cc1e6e54f
commit d319d09882
2 changed files with 9 additions and 5 deletions
+6 -5
View File
@@ -40,11 +40,12 @@ const (
_UNICODE_NOCHAR = 0xffff
_WM_CHAR = 0x0102
_WM_IME_COMPOSITION = 0x010F
_WM_IME_SETCONTEXT = 0x0281
_WM_SYSCHAR = 0x0106
_WM_UNICHAR = 0x0109
_WM_CHAR = 0x0102
_WM_IME_COMPOSITION = 0x010F
_WM_IME_ENDCOMPOSITION = 0x010e
_WM_IME_SETCONTEXT = 0x0281
_WM_SYSCHAR = 0x0106
_WM_UNICHAR = 0x0109
)
type (
+3
View File
@@ -164,6 +164,9 @@ func (t *textInput) wndProc(hWnd uintptr, uMsg uint32, wParam, lParam uintptr) u
}
return 1
}
case _WM_IME_ENDCOMPOSITION:
t.send("", 0, 0, false)
return 1
case _WM_CHAR, _WM_SYSCHAR:
if wParam >= 0xd800 && wParam <= 0xdbff {
t.highSurrogate = uint16(wParam)