Enable IME on Linux/Wayland#9602
Conversation
Closes warpdotdev#9383. `set_ime_allowed(true)` was only called inside a `#[cfg(windows)]` block, so on Linux/Wayland the winit backend never sent `zwp_text_input_v3.enable()` to the compositor and IME stayed inactive — non-Latin input (CJK, etc.) was effectively unusable. Add a parallel `#[cfg(target_os = "linux")]` call right after the Windows one. macOS continues to use the native NSTextInputClient route and does not need this.
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I reviewed this pull request and requested human review from: @vorporeal. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR enables winit IME handling for Linux windows by calling set_ime_allowed(true) after successful window creation, matching the existing Windows setup path and allowing Wayland text-input activation for CJK/non-Latin input.
Concerns
- No blocking correctness or security concerns found in the changed hunk.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
vorporeal
left a comment
There was a problem hiding this comment.
Functional verification needs a Wayland session, which I can't run locally; CI on Linux runners should cover compilation. A maintainer with a Wayland setup could confirm IME behaviour with a CJK input method.
i don't want to merge a prospective fix without confirmation that this fixes the reported issue; can you comment on the linked bug and ask someone there, who has experienced/reported this, to validate that this actually fixes the problem?
Closes #9383.
Description
set_ime_allowed(true)was only being called inside the#[cfg(windows)]block incrates/warpui/src/windowing/winit/window.rs::create_window(the block that ends around line 1421 on master). On Linux/Wayland, winit's text-input plugin only sendszwp_text_input_v3.enable()to the compositor afterset_ime_allowed(true)is called — without that call IME stays inactive, so non-Latin input methods (CJK in particular) appear to do nothing in Warp.Fix
Add a parallel
#[cfg(target_os = "linux")]block right after the Windows one calling the same method on the created window. macOS continues to use the native NSTextInputClient route and does not need this winit hint.A repo-wide grep for
set_ime_allowedconfirms there is no other Linux-specific call site that was already covering this — the previous behaviour was "Windows-only" by oversight, not by design.Testing
cargo fmt -p warpui -- --check— passes.cargo nextest, mirroring Expand~inwarp://action/new_tab?path=URLs #9277). The change is a 7-line addition that mirrors the existing Windows block exactly.Coordination with #9536
PR #9536 (open) modifies the same file but inside
maybe_adjust_window_vertically(lines ~1433+ on master, adding 3 lines that early-return on maximize/fullscreen). My edit lands increate_windowon lines 1422–1428, which #9536 does not touch — no merge conflict expected.Server API
No server changes.
Agent Mode
Not applicable.
Changelog Entries
CHANGELOG-BUG-FIX: IME (input method) now activates on Linux/Wayland, restoring CJK and other non-Latin input that had been silently broken since first launch.