From 73f9cd2ca4baec35da926a3ac2bea59752fec71c Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Tue, 5 Nov 2024 16:45:35 +0100 Subject: [PATCH 1/2] Cargo.toml: use xkbcommon 0.8 This is the latest upstream version. Part-of: --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 0851d5c4..dee8cdc3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,7 @@ clap = { version = "4.4", features=["std"], default-features = false } zbus = "1.9" zvariant = "2.10" zvariant_derive = "2.10" -xkbcommon = { version = "0.7", features = ["wayland"] } +xkbcommon = { version = "0.8", features = ["wayland"] } [dependencies.cairo-rs] version = "0.18" From 9c21922a9d80a1b4b17c29ed30ec10322e923bf0 Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Tue, 5 Nov 2024 16:50:56 +0100 Subject: [PATCH 2/2] parsing: fix test for new xkbcommon version The latest version of `xkbcommon` (0.8) fixes a bug where `keysym_to_utf8` returned a string including the terminating NULL character. The `unicode_keysym` test used to rely on this behaviour, so we must update it so it still works with the new version. Part-of: --- src/data/parsing.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/parsing.rs b/src/data/parsing.rs index 7c8236f4..6aaf78fb 100644 --- a/src/data/parsing.rs +++ b/src/data/parsing.rs @@ -696,7 +696,7 @@ mod tests { xkb::KEYSYM_NO_FLAGS, ); let keysym = xkb::keysym_to_utf8(keysym); - assert_eq!(keysym, "å\0"); + assert_eq!(keysym, "å"); } #[test]