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!
This commit is contained in:
Josh Megnauth 2024-11-22 02:24:38 -05:00
parent 39de757846
commit ae3586fa14
No known key found for this signature in database
GPG key ID: 70813183462EFAD3
3 changed files with 4 additions and 4 deletions

4
Cargo.lock generated
View file

@ -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",

View file

@ -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"] }

View file

@ -282,7 +282,7 @@ pub fn main() -> Result<(), Box<dyn Error>> {
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);