Skip to content

app: improve IME composition handling#171

Open
qianniancn wants to merge 2 commits into
gioui:mainfrom
qianniancn:ime-windows-composition
Open

app: improve IME composition handling#171
qianniancn wants to merge 2 commits into
gioui:mainfrom
qianniancn:ime-windows-composition

Conversation

@qianniancn

Copy link
Copy Markdown
Contributor

Place the Windows IME candidate window under the active composition text.

Also avoid cancelling IME composition when a snippet update only expands
around matching text.

Fixes: https://todo.sr.ht/~eliasnaur/gio/697

qiannian added 2 commits July 8, 2026 15:53
SnippetCmd can grow to include surrounding text while an IME
composition is active. If the selection has not moved and the old
snippet still matches the new one, don't cancel the platform
composition.

Signed-off-by: qiannian <qianniancn@gmail.com>
Send the editor's visible composition bounds with SelectionCmd and use
them as the CFS_EXCLUDE rectangle for ImmSetCandidateWindow. That puts
the candidate list below the text being composed, instead of just under
the caret.

Handle RESULTSTR and COMPSTR as separate IME updates. Cursor-only
updates move the IME cursor without replacing text in the editor.

Fixes: https://todo.sr.ht/~eliasnaur/gio/697
Signed-off-by: qiannian <qianniancn@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant