From b989d63c2ed7b984a88bebde2c257ee70b44c1bb Mon Sep 17 00:00:00 2001 From: Lionel DARNIS Date: Mon, 25 May 2026 14:27:37 +0200 Subject: [PATCH] fix(keybinds): adapt key_bind.matches to new 3-arg signature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- Cargo.lock | 43 +++++++++++++++++++++++++++++++++++-------- src/main.rs | 2 +- 2 files changed, 36 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 166ba56..36a5175 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1043,7 +1043,20 @@ version = "0.2.0" source = "git+https://github.com/pop-os/cosmic-protocols?rev=160b086#160b086abe03cd34a8a375d7fbe47b24308d1f38" dependencies = [ "bitflags 2.11.1", - "cosmic-protocols", + "cosmic-protocols 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=160b086)", + "libc", + "smithay-client-toolkit", + "wayland-client", + "wayland-protocols", +] + +[[package]] +name = "cosmic-client-toolkit" +version = "0.2.0" +source = "git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1#c253ec1d6804afbcdf250f5cc37ae1194bba7bd2" +dependencies = [ + "bitflags 2.11.1", + "cosmic-protocols 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1)", "libc", "smithay-client-toolkit", "wayland-client", @@ -1081,7 +1094,7 @@ dependencies = [ [[package]] name = "cosmic-freedesktop-icons" version = "0.4.0" -source = "git+https://github.com/pop-os/freedesktop-icons#9c562fe3ecf03241a46a60c0078cd6ea10bd75ce" +source = "git+https://github.com/pop-os/freedesktop-icons#739e266210d471c09af61d529d8f41dccd815b90" dependencies = [ "bstr", "btoi", @@ -1134,6 +1147,20 @@ dependencies = [ "wayland-server", ] +[[package]] +name = "cosmic-protocols" +version = "0.2.0" +source = "git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1#c253ec1d6804afbcdf250f5cc37ae1194bba7bd2" +dependencies = [ + "bitflags 2.11.1", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-protocols-wlr", + "wayland-scanner", + "wayland-server", +] + [[package]] name = "cosmic-settings-daemon" version = "0.1.1-yoda.1" @@ -2557,7 +2584,7 @@ version = "0.14.0" dependencies = [ "bitflags 2.11.1", "bytes", - "cosmic-client-toolkit", + "cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=160b086)", "dnd", "glam", "lilt", @@ -2640,7 +2667,7 @@ name = "iced_runtime" version = "0.14.0" dependencies = [ "bytes", - "cosmic-client-toolkit", + "cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=160b086)", "dnd", "iced_core", "iced_futures", @@ -2688,7 +2715,7 @@ version = "0.14.0" dependencies = [ "bitflags 2.11.1", "bytemuck", - "cosmic-client-toolkit", + "cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=160b086)", "cryoglyph", "futures", "glam", @@ -2713,7 +2740,7 @@ dependencies = [ name = "iced_widget" version = "0.14.2" dependencies = [ - "cosmic-client-toolkit", + "cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=160b086)", "dnd", "iced_renderer", "iced_runtime", @@ -2730,7 +2757,7 @@ dependencies = [ name = "iced_winit" version = "0.14.0" dependencies = [ - "cosmic-client-toolkit", + "cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=160b086)", "cursor-icon", "dnd", "iced_debug", @@ -3313,7 +3340,7 @@ dependencies = [ "apply", "ashpd 0.12.3", "auto_enums", - "cosmic-client-toolkit", + "cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1)", "cosmic-config", "cosmic-freedesktop-icons", "cosmic-settings-daemon", diff --git a/src/main.rs b/src/main.rs index bb74ab4..22fd8e7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1233,7 +1233,7 @@ impl Application for App { }, Message::Key(modifiers, key) => { for (key_bind, action) in self.key_binds.iter() { - if key_bind.matches(modifiers, &key) { + if key_bind.matches(modifiers, &key, None) { return self.update(action.message()); } }