From 72fae51b007960af1e90c56e82e2062d0b95588e Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 21 Jan 2024 15:48:09 -0700 Subject: [PATCH] x11/wayland: avoid including keysym name in compose cursor refs: https://github.com/wez/wezterm/issues/4511 --- docs/changelog.md | 1 + window/src/os/x11/keyboard.rs | 11 ++++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index 7d82a7516..06d341665 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -156,6 +156,7 @@ As features stabilize some brief notes about them will accumulate here. * Incorrect sunset / sunrise progression. Thanks to @mikyk10! #4809 #4810 * retro tab bar indented too far on macOS when using integrated titlebar buttons. Thanks to @0xdead10cd! #4505 +* x11/wayland: avoid including keysym name in deadkey compose cursor. #4511 #### Updated * Bundled harfbuzz to 8.3.0 diff --git a/window/src/os/x11/keyboard.rs b/window/src/os/x11/keyboard.rs index 7d8be7113..678204363 100644 --- a/window/src/os/x11/keyboard.rs +++ b/window/src/os/x11/keyboard.rs @@ -92,17 +92,14 @@ impl Compose { // we don't have a fantastic way to indicate what is // currently being composed, so we try to get something // that might be meaningful by getting the utf8 for that - // key if known, or falling back to the name of the keysym. - // The keysym name is likely much wider than the utf8, but - // it's probably better than nothing. - // An alternative we could use if folks don't like it is - // either a space or an underscore. + // key if known. + // We used to fall back to the name of the keysym, but + // feedback was that is was undesirable + // let key_state = key_state.borrow(); let utf8 = key_state.key_get_utf8(xcode); if !utf8.is_empty() { self.composition.push_str(&utf8); - } else { - self.composition.push_str(&xkb::keysym_get_name(xsym)); } } FeedResult::Composing(self.composition.clone())