From ae3586fa149642aeae2fabec24214440aacf7fae Mon Sep 17 00:00:00 2001 From: Josh Megnauth Date: Fri, 22 Nov 2024 02:24:38 -0500 Subject: [PATCH] fix: Correctly detect all keyboard layouts Closes: #1160 See these for more info: * pop-os/cosmic-applets#725 * lilyinstarlight/nixos-cosmic#484 * lilyinstarlight/nixos-cosmic#74 Also, thanks to @Thatoo for all of the help in figuring this out! --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- src/greeter.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 28a9c30..5c707fd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5733,9 +5733,9 @@ dependencies = [ [[package]] name = "xkb-data" -version = "0.1.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "294a599fc9e6a43c9f44f5d6c560b89fd751be413717442b31c17fa367d3c764" +checksum = "ddbaf7dc9e1a13a8a6dd4beb794d463ae16d150879092c757f4aea2d17b81305" dependencies = [ "serde", "serde-xml-rs", diff --git a/Cargo.toml b/Cargo.toml index b2970b8..a0ab135 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ pam-client = "0.5.0" pwd.workspace = true ron.workspace = true shlex = "1.3.0" -xkb-data = "0.1" +xkb-data = "0.2" xdg = "2.5.2" #TODO: reduce features tokio = { workspace = true, features = ["full"] } diff --git a/src/greeter.rs b/src/greeter.rs index 7e85d05..32c98be 100644 --- a/src/greeter.rs +++ b/src/greeter.rs @@ -282,7 +282,7 @@ pub fn main() -> Result<(), Box> { sessions }; - let layouts_opt = match xkb_data::keyboard_layouts() { + let layouts_opt = match xkb_data::all_keyboard_layouts() { Ok(ok) => Some(Arc::new(ok)), Err(err) => { log::warn!("failed to load keyboard layouts: {}", err);