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
This commit is contained in:
RoblKyogre 2024-03-25 11:44:24 -07:00 committed by GitHub
parent 6231df978b
commit 030e299b27
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -796,7 +796,12 @@ impl Dispatch<wl_keyboard::WlKeyboard, ()> 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; state.repeat.current_keysym = None;
} }