linux: Fix some small issues (#11458)

Fixed various small issues on Linux, mainly on Wayland.

Apart from the first commit (which should be self-describing), the other
commits have a description explaining the issue and what they do.

caadc58bea should fix
https://github.com/zed-industries/zed/issues/11037

Release Notes:

- N/A
This commit is contained in:
apricotbucket28 2024-05-06 17:23:49 -03:00 committed by GitHub
parent fd3831861b
commit 11bc28080f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 23 additions and 21 deletions

View file

@ -613,11 +613,9 @@ impl Keystroke {
}
};
// Ignore control characters (and DEL) for the purposes of ime_key,
// but if key_utf32 is 0 then assume it isn't one
let ime_key = ((key_utf32 == 0 || (key_utf32 >= 32 && key_utf32 != 127))
&& !key_utf8.is_empty())
.then_some(key_utf8);
// Ignore control characters (and DEL) for the purposes of ime_key
let ime_key =
(key_utf32 >= 32 && key_utf32 != 127 && !key_utf8.is_empty()).then_some(key_utf8);
if handle_consumed_modifiers {
let mod_shift_index = state.get_keymap().mod_get_index(xkb::MOD_NAME_SHIFT);