From 559a29e97ae2651f139befefeb77dec6e1f87770 Mon Sep 17 00:00:00 2001 From: Sha1rholder Date: Mon, 7 Sep 2026 11:06:21 +0000 Subject: [PATCH] gpui_linux: Disable IME in project panel when no input handler on Wayland (#63776) # Objective Fixes #63774 ## Solution On Wayland, the IME remained enabled when the focused control did not register a text input handler. This allowed IME to intercept ABC...Z character shortcuts in non-text UI, including the Project Panel outside filename editing. However Windows 11 doesn't have this problem. Fixed it by treating a missing input handler as not accepting text input. ## Testing I've tested on both Vim/Helix mode and normal mode with Vim/Helix keybinds. All clear now. ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable ## Showcase [after.webm](https://github.com/user-attachments/assets/91743d71-05c5-49d2-b032-4aebc8e91496) ABC...Z character shortcuts are not going to be intercepted by IME unexpectedly in project panel now. --- Release Notes: - Fixed IME remains enabled in project panel without a focused text input in Wayland #63774 --- crates/gpui_linux/src/linux/wayland/window.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/gpui_linux/src/linux/wayland/window.rs b/crates/gpui_linux/src/linux/wayland/window.rs index eb84b7f7fd..c0a7a6410f 100644 --- a/crates/gpui_linux/src/linux/wayland/window.rs +++ b/crates/gpui_linux/src/linux/wayland/window.rs @@ -1043,7 +1043,7 @@ impl WaylandWindowStatePtr { accepts_text_input } else { drop(state); - true + false }; if Some(ime_enabled) == client.ime_enabled() { return;