fix: libcosmic updates
This commit is contained in:
parent
a3132220e2
commit
a301e64503
4 changed files with 33 additions and 14 deletions
28
Cargo.lock
generated
28
Cargo.lock
generated
|
|
@ -1310,7 +1310,7 @@ version = "0.2.0"
|
||||||
source = "git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1#c253ec1d6804afbcdf250f5cc37ae1194bba7bd2"
|
source = "git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1#c253ec1d6804afbcdf250f5cc37ae1194bba7bd2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.11.1",
|
"bitflags 2.11.1",
|
||||||
"cosmic-protocols 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1)",
|
"cosmic-protocols",
|
||||||
"libc",
|
"libc",
|
||||||
"smithay-client-toolkit",
|
"smithay-client-toolkit",
|
||||||
"wayland-client",
|
"wayland-client",
|
||||||
|
|
@ -1353,7 +1353,7 @@ dependencies = [
|
||||||
"atomic_float",
|
"atomic_float",
|
||||||
"bstr",
|
"bstr",
|
||||||
"compio",
|
"compio",
|
||||||
"cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=160b086)",
|
"cosmic-client-toolkit",
|
||||||
"dirs 6.0.0",
|
"dirs 6.0.0",
|
||||||
"filetime",
|
"filetime",
|
||||||
"flate2",
|
"flate2",
|
||||||
|
|
@ -2863,7 +2863,7 @@ version = "0.14.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.11.1",
|
"bitflags 2.11.1",
|
||||||
"bytes",
|
"bytes",
|
||||||
"cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1)",
|
"cosmic-client-toolkit",
|
||||||
"dnd",
|
"dnd",
|
||||||
"glam",
|
"glam",
|
||||||
"lilt",
|
"lilt",
|
||||||
|
|
@ -2947,7 +2947,7 @@ name = "iced_runtime"
|
||||||
version = "0.14.0"
|
version = "0.14.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1)",
|
"cosmic-client-toolkit",
|
||||||
"dnd",
|
"dnd",
|
||||||
"iced_core",
|
"iced_core",
|
||||||
"iced_futures",
|
"iced_futures",
|
||||||
|
|
@ -2978,7 +2978,7 @@ version = "0.14.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.11.1",
|
"bitflags 2.11.1",
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1)",
|
"cosmic-client-toolkit",
|
||||||
"cryoglyph",
|
"cryoglyph",
|
||||||
"futures",
|
"futures",
|
||||||
"glam",
|
"glam",
|
||||||
|
|
@ -3003,7 +3003,7 @@ dependencies = [
|
||||||
name = "iced_widget"
|
name = "iced_widget"
|
||||||
version = "0.14.2"
|
version = "0.14.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1)",
|
"cosmic-client-toolkit",
|
||||||
"dnd",
|
"dnd",
|
||||||
"iced_renderer",
|
"iced_renderer",
|
||||||
"iced_runtime",
|
"iced_runtime",
|
||||||
|
|
@ -3020,7 +3020,7 @@ dependencies = [
|
||||||
name = "iced_winit"
|
name = "iced_winit"
|
||||||
version = "0.14.0"
|
version = "0.14.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1)",
|
"cosmic-client-toolkit",
|
||||||
"cursor-icon",
|
"cursor-icon",
|
||||||
"dnd",
|
"dnd",
|
||||||
"iced_debug",
|
"iced_debug",
|
||||||
|
|
@ -4106,7 +4106,7 @@ dependencies = [
|
||||||
"apply",
|
"apply",
|
||||||
"ashpd 0.12.3",
|
"ashpd 0.12.3",
|
||||||
"auto_enums",
|
"auto_enums",
|
||||||
"cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1)",
|
"cosmic-client-toolkit",
|
||||||
"cosmic-config",
|
"cosmic-config",
|
||||||
"cosmic-freedesktop-icons",
|
"cosmic-freedesktop-icons",
|
||||||
"cosmic-settings-daemon",
|
"cosmic-settings-daemon",
|
||||||
|
|
@ -5747,6 +5747,16 @@ dependencies = [
|
||||||
"url",
|
"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]]
|
[[package]]
|
||||||
name = "redox_syscall"
|
name = "redox_syscall"
|
||||||
version = "0.5.18"
|
version = "0.5.18"
|
||||||
|
|
@ -8209,7 +8219,7 @@ dependencies = [
|
||||||
"libredox",
|
"libredox",
|
||||||
"orbclient",
|
"orbclient",
|
||||||
"raw-window-handle",
|
"raw-window-handle",
|
||||||
"redox_syscall 0.7.5",
|
"redox_event",
|
||||||
"smol_str",
|
"smol_str",
|
||||||
"tracing",
|
"tracing",
|
||||||
"winit-core",
|
"winit-core",
|
||||||
|
|
|
||||||
15
src/main.rs
15
src/main.rs
|
|
@ -4,6 +4,7 @@
|
||||||
use alacritty_terminal::{event::Event as TermEvent, term, term::color::Colors as TermColors, tty};
|
use alacritty_terminal::{event::Event as TermEvent, term, term::color::Colors as TermColors, tty};
|
||||||
use cosmic::iced::clipboard::dnd::DndAction;
|
use cosmic::iced::clipboard::dnd::DndAction;
|
||||||
use cosmic::iced::core::keyboard::key::Named;
|
use cosmic::iced::core::keyboard::key::Named;
|
||||||
|
use cosmic::iced::keyboard::key::Physical;
|
||||||
use cosmic::widget::menu::action::MenuAction;
|
use cosmic::widget::menu::action::MenuAction;
|
||||||
use cosmic::widget::menu::key_bind::KeyBind;
|
use cosmic::widget::menu::key_bind::KeyBind;
|
||||||
use cosmic::widget::pane_grid::Pane;
|
use cosmic::widget::pane_grid::Pane;
|
||||||
|
|
@ -385,7 +386,7 @@ pub enum Message {
|
||||||
FindSearchValueChanged(String),
|
FindSearchValueChanged(String),
|
||||||
MiddleClick(pane_grid::Pane, Option<segmented_button::Entity>),
|
MiddleClick(pane_grid::Pane, Option<segmented_button::Entity>),
|
||||||
FocusFollowMouse(bool),
|
FocusFollowMouse(bool),
|
||||||
Key(Modifiers, Key),
|
Key(Modifiers, Physical, Key),
|
||||||
LaunchUrl(String),
|
LaunchUrl(String),
|
||||||
LaunchUrlByMenu,
|
LaunchUrlByMenu,
|
||||||
Modifiers(Modifiers),
|
Modifiers(Modifiers),
|
||||||
|
|
@ -1002,6 +1003,7 @@ impl App {
|
||||||
//TODO: re-export in libcosmic
|
//TODO: re-export in libcosmic
|
||||||
iced::widget::text::Style {
|
iced::widget::text::Style {
|
||||||
color: Some(cosmic.destructive_text_color().into()),
|
color: Some(cosmic.destructive_text_color().into()),
|
||||||
|
..Default::default()
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
.into(),
|
.into(),
|
||||||
|
|
@ -2433,7 +2435,7 @@ impl Application for App {
|
||||||
Message::FocusFollowMouse(focus_follow_mouse) => {
|
Message::FocusFollowMouse(focus_follow_mouse) => {
|
||||||
config_set!(focus_follow_mouse, focus_follow_mouse);
|
config_set!(focus_follow_mouse, focus_follow_mouse);
|
||||||
}
|
}
|
||||||
Message::Key(modifiers, key) => {
|
Message::Key(modifiers, physical, key) => {
|
||||||
// Hard-coded keys
|
// Hard-coded keys
|
||||||
match key {
|
match key {
|
||||||
Key::Named(Named::Copy) => {
|
Key::Named(Named::Copy) => {
|
||||||
|
|
@ -3702,9 +3704,12 @@ impl Application for App {
|
||||||
|
|
||||||
Subscription::batch([
|
Subscription::batch([
|
||||||
event::listen_with(|event, _status, _window_id| match event {
|
event::listen_with(|event, _status, _window_id| match event {
|
||||||
Event::Keyboard(KeyEvent::KeyPressed { key, modifiers, .. }) => {
|
Event::Keyboard(KeyEvent::KeyPressed {
|
||||||
Some(Message::Key(modifiers, key))
|
key,
|
||||||
}
|
physical_key,
|
||||||
|
modifiers,
|
||||||
|
..
|
||||||
|
}) => Some(Message::Key(modifiers, physical_key, key)),
|
||||||
Event::Keyboard(KeyEvent::ModifiersChanged(modifiers)) => {
|
Event::Keyboard(KeyEvent::ModifiersChanged(modifiers)) => {
|
||||||
Some(Message::Modifiers(modifiers))
|
Some(Message::Modifiers(modifiers))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ pub fn context_menu<'a>(
|
||||||
color.alpha *= 0.75;
|
color.alpha *= 0.75;
|
||||||
TextStyle {
|
TextStyle {
|
||||||
color: Some(color.into()),
|
color: Some(color.into()),
|
||||||
|
..Default::default()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -936,6 +936,7 @@ where
|
||||||
},
|
},
|
||||||
Event::Keyboard(KeyEvent::KeyPressed {
|
Event::Keyboard(KeyEvent::KeyPressed {
|
||||||
key: Key::Named(named),
|
key: Key::Named(named),
|
||||||
|
physical_key,
|
||||||
modified_key: Key::Named(modified_named),
|
modified_key: Key::Named(modified_named),
|
||||||
modifiers,
|
modifiers,
|
||||||
text,
|
text,
|
||||||
|
|
@ -1102,6 +1103,7 @@ where
|
||||||
text,
|
text,
|
||||||
modifiers,
|
modifiers,
|
||||||
key,
|
key,
|
||||||
|
physical_key,
|
||||||
..
|
..
|
||||||
}) if state.is_focused && *key == Key::Character(SmolStr::new(" ")) => {
|
}) if state.is_focused && *key == Key::Character(SmolStr::new(" ")) => {
|
||||||
//Special handle Enter, Escape, Backspace and Tab as described in
|
//Special handle Enter, Escape, Backspace and Tab as described in
|
||||||
|
|
@ -1127,6 +1129,7 @@ where
|
||||||
text,
|
text,
|
||||||
modifiers,
|
modifiers,
|
||||||
key,
|
key,
|
||||||
|
physical_key,
|
||||||
..
|
..
|
||||||
}) if state.is_focused => {
|
}) if state.is_focused => {
|
||||||
for key_bind in self.key_binds.keys() {
|
for key_bind in self.key_binds.keys() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue