Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
linux: Fix duplicate IME input on Wayland and Sunshine remotes (#46560)
Bo Hed92f47746f3e
diff --git a/crates/gpui/src/platform/linux/wayland/client.rs b/crates/gpui/src/platform/linux/wayland/client.rsindex 227791324ef..494ae855594 100644--- a/crates/gpui/src/platform/linux/wayland/client.rs+++ b/crates/gpui/src/platform/linux/wayland/client.rs@@ -1224,6 +1224,12 @@ impl Dispatch<wl_seat::WlSeat, ()> for WaylandClientStatePtr {if capabilities.contains(wl_seat::Capability::Keyboard) {let keyboard = seat.get_keyboard(qh, ());+ if let Some(text_input) = state.text_input.take() {+ text_input.destroy();+ state.ime_pre_edit = None;+ state.composing = false;+ }+state.text_input = state.globals.text_input_manager@@ -1238,6 +1244,11 @@ impl Dispatch<wl_seat::WlSeat, ()> for WaylandClientStatePtr {}if capabilities.contains(wl_seat::Capability::Pointer) {let pointer = seat.get_pointer(qh, ());++ if let Some(cursor_shape_device) = state.cursor_shape_device.take() {+ cursor_shape_device.destroy();+ }+state.cursor_shape_device = state.globals.cursor_shape_manager