fix(keybinds): adapt key_bind.matches to new 3-arg signature

Upstream libcosmic added an Option<&Physical> third parameter to
KeyBind::matches for physical-key matching. We pass None at every call
site since these paths only have the logical key available.

Also refresh Cargo.lock to satisfy the libcosmic-yoda squash rebase
absorbed on 2026-05-25.

Leyoda 2026 – GPLv3
This commit is contained in:
Lionel DARNIS 2026-05-25 14:27:36 +02:00
parent 17490bfbca
commit d6c245d809
3 changed files with 363 additions and 241 deletions

598
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -3662,7 +3662,7 @@ impl Application for App {
if self.core.main_window_id() == Some(window_id) || in_surface_ids { if self.core.main_window_id() == Some(window_id) || in_surface_ids {
let entity = self.tab_model.active(); let entity = self.tab_model.active();
for (key_bind, action) in &self.key_binds { for (key_bind, action) in &self.key_binds {
if key_bind.matches(modifiers, &key) { if key_bind.matches(modifiers, &key, None) {
return self.update(action.message(Some(entity))); return self.update(action.message(Some(entity)));
} }
} }

View file

@ -1458,14 +1458,14 @@ impl Application for App {
} }
Message::Key(modifiers, key, text) => { Message::Key(modifiers, key, text) => {
for (key_bind, action) in &self.key_binds { for (key_bind, action) in &self.key_binds {
if key_bind.matches(modifiers, &key) { if key_bind.matches(modifiers, &key, None) {
return self.update(Message::from(action.message())); return self.update(Message::from(action.message()));
} }
} }
// Check key binds from accept label // Check key binds from accept label
if let Some(key_bind) = &self.accept_label.key_bind_opt if let Some(key_bind) = &self.accept_label.key_bind_opt
&& key_bind.matches(modifiers, &key) && key_bind.matches(modifiers, &key, None)
{ {
return self.update(if self.flags.kind.save() { return self.update(if self.flags.kind.save() {
Message::Save(false) Message::Save(false)