diff --git a/src/app/cosmic.rs b/src/app/cosmic.rs index 0b504a53..040bf167 100644 --- a/src/app/cosmic.rs +++ b/src/app/cosmic.rs @@ -104,7 +104,7 @@ where #[cfg(feature = "wayland")] fn should_exit(&self) -> bool { - self.should_exit + self.should_exit || self.app.should_exit() } fn style(&self) -> ::Style { diff --git a/src/app/mod.rs b/src/app/mod.rs index 01b7a59d..97f017d2 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -168,6 +168,11 @@ where /// Called before closing the application. fn on_app_exit(&mut self) {} + #[cfg(feature = "wayland")] + fn should_exit(&self) -> bool { + false + } + /// Called when a window requests to be closed. fn on_close_requested(&self, id: window::Id) -> Option { None