Update libcosmic and iced
This commit is contained in:
parent
f851dab984
commit
f5a205159a
3 changed files with 46 additions and 65 deletions
42
Cargo.lock
generated
42
Cargo.lock
generated
|
|
@ -1160,7 +1160,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-config"
|
name = "cosmic-config"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/pop-os/libcosmic.git#07763aca8e08f7b371aaebd353e145cc62121cd5"
|
source = "git+https://github.com/pop-os/libcosmic.git#f1e52b3aaa60af9e2baa647a11cb9cdb13862af2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atomicwrites",
|
"atomicwrites",
|
||||||
"cosmic-config-derive",
|
"cosmic-config-derive",
|
||||||
|
|
@ -1179,7 +1179,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-config-derive"
|
name = "cosmic-config-derive"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/pop-os/libcosmic.git#07763aca8e08f7b371aaebd353e145cc62121cd5"
|
source = "git+https://github.com/pop-os/libcosmic.git#f1e52b3aaa60af9e2baa647a11cb9cdb13862af2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"quote",
|
"quote",
|
||||||
"syn 1.0.109",
|
"syn 1.0.109",
|
||||||
|
|
@ -1288,7 +1288,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-theme"
|
name = "cosmic-theme"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/pop-os/libcosmic.git#07763aca8e08f7b371aaebd353e145cc62121cd5"
|
source = "git+https://github.com/pop-os/libcosmic.git#f1e52b3aaa60af9e2baa647a11cb9cdb13862af2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"almost",
|
"almost",
|
||||||
"cosmic-config",
|
"cosmic-config",
|
||||||
|
|
@ -2731,7 +2731,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced"
|
name = "iced"
|
||||||
version = "0.14.0-dev"
|
version = "0.14.0-dev"
|
||||||
source = "git+https://github.com/pop-os/libcosmic.git#07763aca8e08f7b371aaebd353e145cc62121cd5"
|
source = "git+https://github.com/pop-os/libcosmic.git#f1e52b3aaa60af9e2baa647a11cb9cdb13862af2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dnd",
|
"dnd",
|
||||||
"iced_accessibility",
|
"iced_accessibility",
|
||||||
|
|
@ -2749,7 +2749,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_accessibility"
|
name = "iced_accessibility"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/pop-os/libcosmic.git#07763aca8e08f7b371aaebd353e145cc62121cd5"
|
source = "git+https://github.com/pop-os/libcosmic.git#f1e52b3aaa60af9e2baa647a11cb9cdb13862af2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"accesskit",
|
"accesskit",
|
||||||
"accesskit_winit",
|
"accesskit_winit",
|
||||||
|
|
@ -2758,7 +2758,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_core"
|
name = "iced_core"
|
||||||
version = "0.14.0-dev"
|
version = "0.14.0-dev"
|
||||||
source = "git+https://github.com/pop-os/libcosmic.git#07763aca8e08f7b371aaebd353e145cc62121cd5"
|
source = "git+https://github.com/pop-os/libcosmic.git#f1e52b3aaa60af9e2baa647a11cb9cdb13862af2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.6.0",
|
"bitflags 2.6.0",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
|
@ -2783,7 +2783,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_futures"
|
name = "iced_futures"
|
||||||
version = "0.14.0-dev"
|
version = "0.14.0-dev"
|
||||||
source = "git+https://github.com/pop-os/libcosmic.git#07763aca8e08f7b371aaebd353e145cc62121cd5"
|
source = "git+https://github.com/pop-os/libcosmic.git#f1e52b3aaa60af9e2baa647a11cb9cdb13862af2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures",
|
"futures",
|
||||||
"iced_core",
|
"iced_core",
|
||||||
|
|
@ -2809,7 +2809,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_graphics"
|
name = "iced_graphics"
|
||||||
version = "0.14.0-dev"
|
version = "0.14.0-dev"
|
||||||
source = "git+https://github.com/pop-os/libcosmic.git#07763aca8e08f7b371aaebd353e145cc62121cd5"
|
source = "git+https://github.com/pop-os/libcosmic.git#f1e52b3aaa60af9e2baa647a11cb9cdb13862af2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.6.0",
|
"bitflags 2.6.0",
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
|
|
@ -2831,7 +2831,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_renderer"
|
name = "iced_renderer"
|
||||||
version = "0.14.0-dev"
|
version = "0.14.0-dev"
|
||||||
source = "git+https://github.com/pop-os/libcosmic.git#07763aca8e08f7b371aaebd353e145cc62121cd5"
|
source = "git+https://github.com/pop-os/libcosmic.git#f1e52b3aaa60af9e2baa647a11cb9cdb13862af2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"iced_graphics",
|
"iced_graphics",
|
||||||
"iced_tiny_skia",
|
"iced_tiny_skia",
|
||||||
|
|
@ -2843,7 +2843,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_runtime"
|
name = "iced_runtime"
|
||||||
version = "0.14.0-dev"
|
version = "0.14.0-dev"
|
||||||
source = "git+https://github.com/pop-os/libcosmic.git#07763aca8e08f7b371aaebd353e145cc62121cd5"
|
source = "git+https://github.com/pop-os/libcosmic.git#f1e52b3aaa60af9e2baa647a11cb9cdb13862af2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"dnd",
|
"dnd",
|
||||||
|
|
@ -2859,7 +2859,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_tiny_skia"
|
name = "iced_tiny_skia"
|
||||||
version = "0.14.0-dev"
|
version = "0.14.0-dev"
|
||||||
source = "git+https://github.com/pop-os/libcosmic.git#07763aca8e08f7b371aaebd353e145cc62121cd5"
|
source = "git+https://github.com/pop-os/libcosmic.git#f1e52b3aaa60af9e2baa647a11cb9cdb13862af2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"cosmic-text",
|
"cosmic-text",
|
||||||
|
|
@ -2875,7 +2875,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_wgpu"
|
name = "iced_wgpu"
|
||||||
version = "0.14.0-dev"
|
version = "0.14.0-dev"
|
||||||
source = "git+https://github.com/pop-os/libcosmic.git#07763aca8e08f7b371aaebd353e145cc62121cd5"
|
source = "git+https://github.com/pop-os/libcosmic.git#f1e52b3aaa60af9e2baa647a11cb9cdb13862af2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"as-raw-xcb-connection",
|
"as-raw-xcb-connection",
|
||||||
"bitflags 2.6.0",
|
"bitflags 2.6.0",
|
||||||
|
|
@ -2906,7 +2906,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_widget"
|
name = "iced_widget"
|
||||||
version = "0.14.0-dev"
|
version = "0.14.0-dev"
|
||||||
source = "git+https://github.com/pop-os/libcosmic.git#07763aca8e08f7b371aaebd353e145cc62121cd5"
|
source = "git+https://github.com/pop-os/libcosmic.git#f1e52b3aaa60af9e2baa647a11cb9cdb13862af2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dnd",
|
"dnd",
|
||||||
"iced_accessibility",
|
"iced_accessibility",
|
||||||
|
|
@ -2925,7 +2925,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_winit"
|
name = "iced_winit"
|
||||||
version = "0.14.0-dev"
|
version = "0.14.0-dev"
|
||||||
source = "git+https://github.com/pop-os/libcosmic.git#07763aca8e08f7b371aaebd353e145cc62121cd5"
|
source = "git+https://github.com/pop-os/libcosmic.git#f1e52b3aaa60af9e2baa647a11cb9cdb13862af2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dnd",
|
"dnd",
|
||||||
"iced_accessibility",
|
"iced_accessibility",
|
||||||
|
|
@ -3449,7 +3449,7 @@ checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1"
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libcosmic"
|
name = "libcosmic"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/pop-os/libcosmic.git#07763aca8e08f7b371aaebd353e145cc62121cd5"
|
source = "git+https://github.com/pop-os/libcosmic.git#f1e52b3aaa60af9e2baa647a11cb9cdb13862af2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"apply",
|
"apply",
|
||||||
"ashpd 0.9.2",
|
"ashpd 0.9.2",
|
||||||
|
|
@ -5259,18 +5259,18 @@ checksum = "d369a96f978623eb3dc28807c4852d6cc617fed53da5d3c400feff1ef34a714a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde"
|
name = "serde"
|
||||||
version = "1.0.210"
|
version = "1.0.211"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a"
|
checksum = "1ac55e59090389fb9f0dd9e0f3c09615afed1d19094284d0b200441f13550793"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_derive"
|
name = "serde_derive"
|
||||||
version = "1.0.210"
|
version = "1.0.211"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f"
|
checksum = "54be4f245ce16bc58d57ef2716271d0d4519e0f6defa147f6e081005bcb278ff"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
|
@ -5892,9 +5892,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tokio"
|
name = "tokio"
|
||||||
version = "1.40.0"
|
version = "1.41.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998"
|
checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"backtrace",
|
"backtrace",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
|
|
||||||
41
src/app.rs
41
src/app.rs
|
|
@ -3925,36 +3925,25 @@ impl Application for App {
|
||||||
struct TrashWatcherSubscription;
|
struct TrashWatcherSubscription;
|
||||||
|
|
||||||
let mut subscriptions = vec![
|
let mut subscriptions = vec![
|
||||||
event::listen_with(|event, status, window_id| {
|
event::listen_with(|event, status, _window_id| match event {
|
||||||
//TODO: why are we getting keyboard events for this window Id?
|
Event::Keyboard(KeyEvent::KeyPressed { key, modifiers, .. }) => match status {
|
||||||
if window_id == window::Id::NONE {
|
event::Status::Ignored => Some(Message::Key(modifiers, key)),
|
||||||
return match event {
|
event::Status::Captured => None,
|
||||||
#[cfg(feature = "wayland")]
|
},
|
||||||
Event::PlatformSpecific(event::PlatformSpecific::Wayland(
|
Event::Keyboard(KeyEvent::ModifiersChanged(modifiers)) => {
|
||||||
wayland_event,
|
Some(Message::Modifiers(modifiers))
|
||||||
)) => {
|
}
|
||||||
println!("{:?}", wayland_event);
|
Event::Window(WindowEvent::CloseRequested) => Some(Message::WindowClose),
|
||||||
match wayland_event {
|
#[cfg(feature = "wayland")]
|
||||||
WaylandEvent::Output(output_event, output) => {
|
Event::PlatformSpecific(event::PlatformSpecific::Wayland(wayland_event)) => {
|
||||||
Some(Message::OutputEvent(output_event, output))
|
match wayland_event {
|
||||||
}
|
WaylandEvent::Output(output_event, output) => {
|
||||||
_ => None,
|
Some(Message::OutputEvent(output_event, output))
|
||||||
}
|
|
||||||
}
|
}
|
||||||
_ => None,
|
_ => None,
|
||||||
};
|
|
||||||
}
|
|
||||||
match event {
|
|
||||||
Event::Keyboard(KeyEvent::KeyPressed { key, modifiers, .. }) => match status {
|
|
||||||
event::Status::Ignored => Some(Message::Key(modifiers, key)),
|
|
||||||
event::Status::Captured => None,
|
|
||||||
},
|
|
||||||
Event::Keyboard(KeyEvent::ModifiersChanged(modifiers)) => {
|
|
||||||
Some(Message::Modifiers(modifiers))
|
|
||||||
}
|
}
|
||||||
Event::Window(WindowEvent::CloseRequested) => Some(Message::WindowClose),
|
|
||||||
_ => None,
|
|
||||||
}
|
}
|
||||||
|
_ => None,
|
||||||
}),
|
}),
|
||||||
Config::subscription().map(|update| {
|
Config::subscription().map(|update| {
|
||||||
if !update.errors.is_empty() {
|
if !update.errors.is_empty() {
|
||||||
|
|
|
||||||
|
|
@ -173,7 +173,7 @@ impl<M: Send + 'static> Dialog<M> {
|
||||||
let (window_id, window_command) = window::open(settings.clone());
|
let (window_id, window_command) = window::open(settings.clone());
|
||||||
|
|
||||||
let mut core = Core::default();
|
let mut core = Core::default();
|
||||||
core.set_main_window_id(window_id);
|
core.set_main_window_id(Some(window_id));
|
||||||
let flags = Flags {
|
let flags = Flags {
|
||||||
kind,
|
kind,
|
||||||
path_opt: path_opt
|
path_opt: path_opt
|
||||||
|
|
@ -190,9 +190,7 @@ impl<M: Send + 'static> Dialog<M> {
|
||||||
config,
|
config,
|
||||||
};
|
};
|
||||||
|
|
||||||
// settings here is unused
|
let (cosmic, cosmic_command) = Cosmic::<App>::init((core, flags));
|
||||||
let (mut cosmic, cosmic_command) = Cosmic::<App>::init((core, flags, settings));
|
|
||||||
|
|
||||||
(
|
(
|
||||||
Self {
|
Self {
|
||||||
cosmic,
|
cosmic,
|
||||||
|
|
@ -1586,21 +1584,15 @@ impl Application for App {
|
||||||
fn subscription(&self) -> Subscription<Message> {
|
fn subscription(&self) -> Subscription<Message> {
|
||||||
struct WatcherSubscription;
|
struct WatcherSubscription;
|
||||||
let mut subscriptions = vec![
|
let mut subscriptions = vec![
|
||||||
event::listen_with(|event, status, window_id| {
|
event::listen_with(|event, status, _window_id| match event {
|
||||||
//TODO: why are we getting events for this window Id?
|
Event::Keyboard(KeyEvent::KeyPressed { key, modifiers, .. }) => match status {
|
||||||
if window_id == window::Id::NONE {
|
event::Status::Ignored => Some(Message::Key(modifiers, key)),
|
||||||
return None;
|
event::Status::Captured => None,
|
||||||
}
|
},
|
||||||
match event {
|
Event::Keyboard(KeyEvent::ModifiersChanged(modifiers)) => {
|
||||||
Event::Keyboard(KeyEvent::KeyPressed { key, modifiers, .. }) => match status {
|
Some(Message::Modifiers(modifiers))
|
||||||
event::Status::Ignored => Some(Message::Key(modifiers, key)),
|
|
||||||
event::Status::Captured => None,
|
|
||||||
},
|
|
||||||
Event::Keyboard(KeyEvent::ModifiersChanged(modifiers)) => {
|
|
||||||
Some(Message::Modifiers(modifiers))
|
|
||||||
}
|
|
||||||
_ => None,
|
|
||||||
}
|
}
|
||||||
|
_ => None,
|
||||||
}),
|
}),
|
||||||
Config::subscription().map(|update| {
|
Config::subscription().map(|update| {
|
||||||
if !update.errors.is_empty() {
|
if !update.errors.is_empty() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue