Drop the event callback before exiting on macOS (#1954)

* Drop the event callback before exiting

* Update the changelog

* Apply suggestion from review

Co-authored-by: Markus Røyset <maroider@protonmail.com>

* Apply review suggestions

Co-authored-by: Markus Røyset <maroider@protonmail.com>
This commit is contained in:
Artúr Kovács 2021-06-13 14:25:06 +02:00 committed by GitHub
parent c916eb6137
commit c7f46876a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -1,5 +1,6 @@
# Unreleased
- On macOS, drop the event callback before exiting.
- On Android, implement `Window::request_redraw`
- **Breaking:** On Web, remove the `stdweb` backend.
- Added `Window::focus_window`to bring the window to the front and set input focus.

View file

@ -174,10 +174,12 @@ impl<T> EventLoop<T> {
let () = msg_send![app, run];
if let Some(panic) = self.panic_info.take() {
drop(self._callback.take());
resume_unwind(panic);
}
AppState::exit();
});
drop(self._callback.take());
}
pub fn create_proxy(&self) -> Proxy<T> {