From 030e299b2718fe7ce92a78fd6945fba8721dac37 Mon Sep 17 00:00:00 2001 From: RoblKyogre Date: Mon, 25 Mar 2024 11:44:24 -0700 Subject: [PATCH] Fix key repeat after releasing a different key on Wayland (#9768) Quick fix that fixes key repeat not working when releasing a different key than the current one being held Don't really know much rust yet, so unsure this is the best way to handle this, but this does seem like a good starting point to get at least a tad familiar with it Release Notes: - N/A --- crates/gpui/src/platform/linux/wayland/client.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/gpui/src/platform/linux/wayland/client.rs b/crates/gpui/src/platform/linux/wayland/client.rs index c3fbe3ea25..d14688e106 100644 --- a/crates/gpui/src/platform/linux/wayland/client.rs +++ b/crates/gpui/src/platform/linux/wayland/client.rs @@ -796,7 +796,12 @@ impl Dispatch for WaylandClientState { }) }; - if !keysym.is_modifier_key() { + if !keysym.is_modifier_key() + && (match state.repeat.current_keysym { + Some(repeat_keysym) => keysym == repeat_keysym, + None => false, + }) + { state.repeat.current_keysym = None; }