Fix IME not enabled on Linux/Wayland (set_ime_allowed missing from Linux path)#9384
Fix IME not enabled on Linux/Wayland (set_ime_allowed missing from Linux path)#9384leozeli wants to merge 1 commit intowarpdotdev:masterfrom
Conversation
…nux path) winit's set_ime_allowed(true) was only called inside a #[cfg(windows)] block, so on Linux/Wayland the zwp_text_input_v3.enable() signal was never sent to the compositor. Without it, input methods (fcitx5, ibus) never receive a keyboard grab for the Warp window, making CJK and IME-based input impossible. Add an equivalent #[cfg(target_os = "linux")] call after window creation to enable IME on Linux. Verified with Hyprland 0.54.3 + fcitx5 + Rime. Fixes warpdotdev#9383 Related: warpdotdev#6877
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @leozeli on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I approved this pull request. No matching stakeholder was found for the changed files, so no human reviewers were requested. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR enables winit IME support on Linux after successful window creation, matching the existing Windows behavior so Wayland compositors can activate text input for IME users.
Concerns
- No blocking correctness or security concerns found in the changed lines. The local security-review-pr skill was not present in this checkout, so I performed the supplemental security pass using the base review security criteria.
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
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
Description
Fixes #9383 (related: #6877)
winit::Window::set_ime_allowed(true)was wrapped inside a#[cfg(windows)]block increate_window(), so on Linux/Wayland it was never called. Without this call, winit never sendszwp_text_input_v3.enable()to the Wayland compositor — meaning the compositor never activates the IM session for the window, and input methods (fcitx5, ibus) never receive a keyboard grab. The result: pressing the IME trigger key (Ctrl+Space) has no effect, and CJK/IME input is completely broken on Wayland.Fix: add an equivalent
#[cfg(target_os = "linux")]block immediately after the#[cfg(windows)]block, callingset_ime_allowed(true)when window creation succeeds.Testing
fcitx5-remotestays at state1(inactive) with Warp focused;Ctrl+Spacehas no effectfcitx5-remotetransitions to state2(active); Rime preedit and CJK commit work correctly in the terminal inputcargo check -p warpuipasses;cargo build --bin warp-osssucceedsNo new automated tests added — the IME activation path is a Wayland protocol side-effect that requires a live compositor to exercise.
Changelog Entries for Stable
CHANGELOG-BUG-FIX: Fixed IME (fcitx5, ibus) not activating on Linux/Wayland, restoring CJK and other input-method-based input