1
0
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:
Luke Jones
2023-04-19 01:08:17 +12:00
committed by GitHub
parent 6f1e66731e
commit 7c12bb692b
2 changed files with 2 additions and 0 deletions

View File

@@ -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;
}