mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
eframe: add call to save_and_destroy in Exit event of run_return (#2895)
`EventResult::Exit` is hit before `Event::LoopDestroyed` is, and due to possibly some order of operations or drops the window is never destroyed on Linux. Adding a call to `winit_app.save_and_destroy();` where `EventResult::Exit` is checked solves this. Closes #2892 Signed-off-by: Luke D. Jones <luke@ljones.dev>
This commit is contained in:
@@ -190,6 +190,7 @@ fn run_and_return(
|
||||
}
|
||||
EventResult::Exit => {
|
||||
tracing::debug!("Asking to exit event loop…");
|
||||
winit_app.save_and_destroy();
|
||||
*control_flow = ControlFlow::Exit;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user