1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 13:50:04 -04:00

Properly end winit event loop (#7565)

This commit is contained in:
Tye
2025-09-30 14:48:54 +01:00
committed by GitHub
parent 47c5617740
commit a450b1c989
4 changed files with 33 additions and 21 deletions

View File

@@ -139,6 +139,11 @@ impl<T: WinitApp> WinitAppWrapper<T> {
exit = true;
event_result
}
EventResult::CloseRequested => {
// The windows need to be dropped whilst the event loop is running to allow for proper cleanup.
self.winit_app.save_and_destroy();
event_result
}
});
if let Err(err) = combined_result {