Introduce close_requested for multi-window
This commit is contained in:
parent
35331d0a41
commit
dc86bd0373
4 changed files with 26 additions and 4 deletions
|
|
@ -250,6 +250,10 @@ impl Application for Example {
|
|||
.collect()
|
||||
}
|
||||
|
||||
fn close_requested(&self, window: window::Id) -> Self::Message {
|
||||
Message::Window(window, WindowMessage::CloseWindow)
|
||||
}
|
||||
|
||||
fn view(&self, window_id: window::Id) -> Element<Message> {
|
||||
if let Some(window) = self.windows.get(&window_id) {
|
||||
let focus = window.focus;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue