Produce window::Event::Closed only if window exists
This commit is contained in:
parent
7c2abc9b8b
commit
9b99b932bc
1 changed files with 7 additions and 5 deletions
|
|
@ -1223,13 +1223,15 @@ fn run_action<P, C>(
|
||||||
*is_window_opening = true;
|
*is_window_opening = true;
|
||||||
}
|
}
|
||||||
window::Action::Close(id) => {
|
window::Action::Close(id) => {
|
||||||
let _ = window_manager.remove(id);
|
let window = window_manager.remove(id);
|
||||||
let _ = ui_caches.remove(&id);
|
let _ = ui_caches.remove(&id);
|
||||||
|
|
||||||
events.push((
|
if window.is_some() {
|
||||||
id,
|
events.push((
|
||||||
core::Event::Window(core::window::Event::Closed),
|
id,
|
||||||
));
|
core::Event::Window(core::window::Event::Closed),
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
window::Action::GetOldest(channel) => {
|
window::Action::GetOldest(channel) => {
|
||||||
let id =
|
let id =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue