Remove window::Id::MAIN constant
This commit is contained in:
parent
92e08c8f07
commit
c5f4bebeda
6 changed files with 10 additions and 11 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue