Remove window::Id::MAIN constant

This commit is contained in:
Héctor Ramón Jiménez 2024-06-20 01:13:42 +02:00
parent 92e08c8f07
commit c5f4bebeda
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
6 changed files with 10 additions and 11 deletions

View file

@ -47,7 +47,8 @@ impl Example {
fn update(&mut self, message: Message) -> Task<Message> {
match message {
Message::Screenshot => {
return iced::window::screenshot(window::Id::MAIN)
return window::get_latest()
.and_then(window::screenshot)
.map(Message::Screenshotted);
}
Message::Screenshotted(screenshot) => {