fix: libcosmic updates

This commit is contained in:
Ashley Wulber 2026-05-26 15:40:59 -04:00 committed by Lionel DARNIS
parent a3132220e2
commit a301e64503
4 changed files with 33 additions and 14 deletions

28
Cargo.lock generated
View file

@ -1310,7 +1310,7 @@ 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)",
"cosmic-protocols",
"libc",
"smithay-client-toolkit",
"wayland-client",
@ -1353,7 +1353,7 @@ dependencies = [
"atomic_float",
"bstr",
"compio",
"cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=160b086)",
"cosmic-client-toolkit",
"dirs 6.0.0",
"filetime",
"flate2",
@ -2863,7 +2863,7 @@ version = "0.14.0"
dependencies = [
"bitflags 2.11.1",
"bytes",
"cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1)",
"cosmic-client-toolkit",
"dnd",
"glam",
"lilt",
@ -2947,7 +2947,7 @@ name = "iced_runtime"
version = "0.14.0"
dependencies = [
"bytes",
"cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1)",
"cosmic-client-toolkit",
"dnd",
"iced_core",
"iced_futures",
@ -2978,7 +2978,7 @@ version = "0.14.0"
dependencies = [
"bitflags 2.11.1",
"bytemuck",
"cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1)",
"cosmic-client-toolkit",
"cryoglyph",
"futures",
"glam",
@ -3003,7 +3003,7 @@ dependencies = [
name = "iced_widget"
version = "0.14.2"
dependencies = [
"cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1)",
"cosmic-client-toolkit",
"dnd",
"iced_renderer",
"iced_runtime",
@ -3020,7 +3020,7 @@ dependencies = [
name = "iced_winit"
version = "0.14.0"
dependencies = [
"cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1)",
"cosmic-client-toolkit",
"cursor-icon",
"dnd",
"iced_debug",
@ -4106,7 +4106,7 @@ dependencies = [
"apply",
"ashpd 0.12.3",
"auto_enums",
"cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1)",
"cosmic-client-toolkit",
"cosmic-config",
"cosmic-freedesktop-icons",
"cosmic-settings-daemon",
@ -5747,6 +5747,16 @@ dependencies = [
"url",
]
[[package]]
name = "redox_event"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ea3e412d205440c7b0218af26247226f979ed1201674cda7a33cc70609084b5"
dependencies = [
"bitflags 2.11.1",
"libredox",
]
[[package]]
name = "redox_syscall"
version = "0.5.18"
@ -8209,7 +8219,7 @@ dependencies = [
"libredox",
"orbclient",
"raw-window-handle",
"redox_syscall 0.7.5",
"redox_event",
"smol_str",
"tracing",
"winit-core",

View file

@ -4,6 +4,7 @@
use alacritty_terminal::{event::Event as TermEvent, term, term::color::Colors as TermColors, tty};
use cosmic::iced::clipboard::dnd::DndAction;
use cosmic::iced::core::keyboard::key::Named;
use cosmic::iced::keyboard::key::Physical;
use cosmic::widget::menu::action::MenuAction;
use cosmic::widget::menu::key_bind::KeyBind;
use cosmic::widget::pane_grid::Pane;
@ -385,7 +386,7 @@ pub enum Message {
FindSearchValueChanged(String),
MiddleClick(pane_grid::Pane, Option<segmented_button::Entity>),
FocusFollowMouse(bool),
Key(Modifiers, Key),
Key(Modifiers, Physical, Key),
LaunchUrl(String),
LaunchUrlByMenu,
Modifiers(Modifiers),
@ -1002,6 +1003,7 @@ impl App {
//TODO: re-export in libcosmic
iced::widget::text::Style {
color: Some(cosmic.destructive_text_color().into()),
..Default::default()
}
}))
.into(),
@ -2433,7 +2435,7 @@ impl Application for App {
Message::FocusFollowMouse(focus_follow_mouse) => {
config_set!(focus_follow_mouse, focus_follow_mouse);
}
Message::Key(modifiers, key) => {
Message::Key(modifiers, physical, key) => {
// Hard-coded keys
match key {
Key::Named(Named::Copy) => {
@ -3702,9 +3704,12 @@ impl Application for App {
Subscription::batch([
event::listen_with(|event, _status, _window_id| match event {
Event::Keyboard(KeyEvent::KeyPressed { key, modifiers, .. }) => {
Some(Message::Key(modifiers, key))
}
Event::Keyboard(KeyEvent::KeyPressed {
key,
physical_key,
modifiers,
..
}) => Some(Message::Key(modifiers, physical_key, key)),
Event::Keyboard(KeyEvent::ModifiersChanged(modifiers)) => {
Some(Message::Modifiers(modifiers))
}

View file

@ -49,6 +49,7 @@ pub fn context_menu<'a>(
color.alpha *= 0.75;
TextStyle {
color: Some(color.into()),
..Default::default()
}
}

View file

@ -936,6 +936,7 @@ where
},
Event::Keyboard(KeyEvent::KeyPressed {
key: Key::Named(named),
physical_key,
modified_key: Key::Named(modified_named),
modifiers,
text,
@ -1102,6 +1103,7 @@ where
text,
modifiers,
key,
physical_key,
..
}) if state.is_focused && *key == Key::Character(SmolStr::new(" ")) => {
//Special handle Enter, Escape, Backspace and Tab as described in
@ -1127,6 +1129,7 @@ where
text,
modifiers,
key,
physical_key,
..
}) if state.is_focused => {
for key_bind in self.key_binds.keys() {