refactor: add is_daemon setting

The app can request to be treated by iced as a daemon so it can perform cleanup when its main window is closed.
This commit is contained in:
Ashley Wulber 2024-11-14 09:56:03 -05:00 committed by Ashley Wulber
parent e3fabf7d12
commit aaadf7199e
4 changed files with 9 additions and 4 deletions

View file

@ -160,7 +160,7 @@ where
return Some(Message::WindowResize(id, width, height));
}
iced::Event::Window(window::Event::Closed) => {
return Some(Message::SurfaceClosed(id))
return Some(Message::SurfaceClosed(id));
}
iced::Event::Window(window::Event::Focused) => return Some(Message::Focus(id)),
iced::Event::Window(window::Event::Unfocused) => return Some(Message::Unfocus(id)),