mirror of
https://github.com/storytold/winit.git
synced 2026-11-28 01:13:21 +01:00
Some IMEs place their composition and candidate windows at the system caret (GetCaretPos, GetGUIThreadInfo) and ignore ImmSetCandidateWindow: Sogou, and some Japanese IMEs. winit created no caret, so those windows didn't follow the text. A window that has the keyboard focus and allows IME now keeps a hidden caret the size of the last IME cursor area, created on focus or when IME is allowed, moved with set_ime_cursor_area, and destroyed before the window loses the focus (Windows has one caret per thread). The policy is plain Rust (ime_caret.rs), so its tests run on every platform through tests/ime_patches.rs, with a guard on its callers. Part of storytold/craft-libs#198 (item I6).