diff --git a/iced b/iced index 8195c7f..55759e5 160000 --- a/iced +++ b/iced @@ -1 +1 @@ -Subproject commit 8195c7f50de6f07ea7475861f9be5139d3fa61e3 +Subproject commit 55759e5bb79f84277ccf198f529af04184912874 diff --git a/src/app/cosmic.rs b/src/app/cosmic.rs index 24c0003..2b405f5 100644 --- a/src/app/cosmic.rs +++ b/src/app/cosmic.rs @@ -69,8 +69,6 @@ pub enum Message { #[derive(Default)] pub(crate) struct Cosmic { pub(crate) app: App, - #[cfg(feature = "wayland")] - pub(crate) should_exit: bool, } impl IcedApplication for Cosmic @@ -229,8 +227,7 @@ where impl Cosmic { #[cfg(feature = "wayland")] pub fn close(&mut self) -> iced::Command> { - self.should_exit = true; - iced::Command::none() + iced_sctk::commands::window::close_window(window::Id::MAIN) } #[cfg(not(feature = "wayland"))] @@ -395,10 +392,6 @@ impl Cosmic { impl Cosmic { pub fn new(app: App) -> Self { - Self { - app, - #[cfg(feature = "wayland")] - should_exit: false, - } + Self { app } } } diff --git a/src/app/mod.rs b/src/app/mod.rs index 651f046..76b8947 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -469,7 +469,7 @@ where /// Constructs views for other windows. fn view_window(&self, id: window::Id) -> Element { - panic!("no view for window {:?}", id); + panic!("no view for window {id:?}"); } /// Overrides the default style for applications