1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-09-15 19:26:58 +02:00

refactor(keys): switch to colpetto

Switches from the `input` crate to new async `colpetto`
This commit is contained in:
Jake Stanger 2025-01-16 23:01:48 +00:00
commit a0231559d0
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
6 changed files with 1188 additions and 1020 deletions

View file

@ -148,10 +148,13 @@ impl Clients {
#[cfg(feature = "keyboard")]
pub fn libinput(&mut self, seat: &str) -> Arc<libinput::Client> {
self.libinput
.entry(seat.into())
.or_insert_with(|| libinput::Client::init(seat.to_string()))
.clone()
if let Some(client) = self.libinput.get(seat) {
client.clone()
} else {
let client = libinput::Client::init(seat.to_string());
self.libinput.insert(seat.into(), client.clone());
client
}
}
#[cfg(feature = "music")]