Skip to content

Fix IME not enabled on Linux/Wayland (set_ime_allowed missing from Linux path)#9384

Open
leozeli wants to merge 1 commit intowarpdotdev:masterfrom
leozeli:leozeli/fix-ime-linux-wayland
Open

Fix IME not enabled on Linux/Wayland (set_ime_allowed missing from Linux path)#9384
leozeli wants to merge 1 commit intowarpdotdev:masterfrom
leozeli:leozeli/fix-ime-linux-wayland

Conversation

@leozeli
Copy link
Copy Markdown

@leozeli leozeli commented Apr 29, 2026

Description

Fixes #9383 (related: #6877)

winit::Window::set_ime_allowed(true) was wrapped inside a #[cfg(windows)] block in create_window(), so on Linux/Wayland it was never called. Without this call, winit never sends zwp_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, calling set_ime_allowed(true) when window creation succeeds.

#[cfg(target_os = "linux")]
if let Ok(window) = created_window.as_ref() {
    window.set_ime_allowed(true);
}

Testing

  • Tested on Arch Linux, Hyprland 0.54.3 (Wayland), fcitx5 + Rime
  • Before fix: fcitx5-remote stays at state 1 (inactive) with Warp focused; Ctrl+Space has no effect
  • After fix: fcitx5-remote transitions to state 2 (active); Rime preedit and CJK commit work correctly in the terminal input
  • cargo check -p warpui passes; cargo build --bin warp-oss succeeds

No 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

…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
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 29, 2026

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 @cla-bot check to trigger another check.

@oz-for-oss
Copy link
Copy Markdown

oz-for-oss Bot commented Apr 29, 2026

@leozeli

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 /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@leozeli
Copy link
Copy Markdown
Author

leozeli commented Apr 29, 2026

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label Apr 29, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 29, 2026

The cla-bot has been summoned, and re-checked this pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: IME (Input Method) never enabled on Linux/Wayland — set_ime_allowed(true) missing from Linux code path

1 participant