Skip to content

fix: enable IME input on Linux and FreeBSD#11618

Open
cislunarspace wants to merge 1 commit into
warpdotdev:masterfrom
cislunarspace:fix-linux-ime-input
Open

fix: enable IME input on Linux and FreeBSD#11618
cislunarspace wants to merge 1 commit into
warpdotdev:masterfrom
cislunarspace:fix-linux-ime-input

Conversation

@cislunarspace
Copy link
Copy Markdown

@cislunarspace cislunarspace commented May 23, 2026

Summary

Enables IME (Input Method Editor) support on Linux and FreeBSD by calling `set_ime_allowed(true)` during window creation, matching the existing Windows behavior.

Problem

On Linux/Wayland, Warp never activated the input method framework, making CJK input completely non-functional. The root cause was that `set_ime_allowed(true)` was only called inside a `#[cfg(windows)]` block.

Without this call, winit never sends `zwp_text_input_v3.enable()` to the Wayland compositor, so fcitx5, ibus, and other IME frameworks never receive keyboard input events.

Fix

Added a `#[cfg(any(target_os = "linux", target_os = "freebsd"))]` block that calls `set_ime_allowed(true)` on the created window, mirroring the Windows implementation.

Screenshots

Before fix: fcitx5 candidate window does not appear, no CJK input possible.

After fix: fcitx5 candidate window appears and text commits correctly:

fcitx5-pinyin-input-1
fcitx5 pinyin candidate window visible in Warp terminal

fcitx5-pinyin-input-2
Chinese text successfully committed into Warp terminal

Related Issues

CHANGELOG-BUG-FIX: Fixed IME input not working on Linux and FreeBSD by enabling winit IME support during window creation.

Test Plan

  • Compile on Linux: `cargo check -p warpui`
  • Run Warp on Linux with fcitx5 active
  • Verify IME candidate window appears and text commits correctly

Call set_ime_allowed(true) on Linux and FreeBSD window creation,
mirroring the existing Windows behavior. Without this, winit never
enables the text-input-v3 protocol on Wayland, preventing fcitx5,
ibus, and other IME frameworks from receiving input events.

Fixes: warpdotdev#9383
Fixes: warpdotdev#5279
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 23, 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 @cislunarspace 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.

@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label May 23, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 23, 2026

@cislunarspace

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

oz-for-oss[bot]
oz-for-oss Bot previously requested changes May 24, 2026
Copy link
Copy Markdown
Contributor

@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/FreeBSD by calling set_ime_allowed(true) after window creation, matching the existing Windows behavior.

Concerns

  • For this user-facing IME input change, please include screenshots or a screen recording demonstrating it working end to end on Linux/FreeBSD with an IME candidate window and committed text. The current PR description has only an unchecked manual test plan, so reviewers do not have visual evidence for the behavior change.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@cislunarspace
Copy link
Copy Markdown
Author

@cla-bot check

Hi team,

I've completed the CLA signing and local verification:

  • CLA: Signed at https://cla.warp.dev
  • Build: cargo build --release --bin warp-oss compiles successfully on Ubuntu 24.04
  • Test: Verified fcitx5 pinyin input works end-to-end — the candidate window appears correctly and Chinese text commits into the terminal as expected (see screenshots in PR description)

Please let me know if anything else is needed. Thanks!

@cla-bot cla-bot Bot added the cla-signed label May 24, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 24, 2026

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

@cislunarspace
Copy link
Copy Markdown
Author

微信图片_20260524080908_443_68 微信图片_20260524080908_444_68

@cislunarspace
Copy link
Copy Markdown
Author

/oz-review

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 24, 2026

@cislunarspace

I'm re-reviewing this pull request in response to a review request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@cislunarspace
Copy link
Copy Markdown
Author

/oz-review

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 24, 2026

@cislunarspace

I'm re-reviewing this pull request in response to a review request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot dismissed their stale review May 24, 2026 00:20

Oz no longer requests changes for this pull request after the latest automated review.

Copy link
Copy Markdown
Contributor

@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 input on Linux and FreeBSD by calling set_ime_allowed(true) after successful window creation, matching the existing Windows behavior.

Concerns

  • No blocking correctness, security, or spec-alignment concerns found in the annotated diff.

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

Copy link
Copy Markdown
Contributor

@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 during window creation on Linux and FreeBSD, matching the existing Windows behavior so IME composition events can be delivered for CJK and other composed input.

Concerns

  • No blocking correctness, spec-alignment, or security concerns found in the changed lines.
  • The PR description includes screenshots demonstrating the user-facing IME behavior after the fix.

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

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

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

1 participant