mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
Fix exit handling (#1696)
This commit is contained in:
@@ -187,7 +187,7 @@ pub fn run_glow(
|
||||
winit::event::WindowEvent::ScaleFactorChanged { new_inner_size, .. } => {
|
||||
gl_window.resize(**new_inner_size);
|
||||
}
|
||||
winit::event::WindowEvent::CloseRequested => {
|
||||
winit::event::WindowEvent::CloseRequested if integration.should_quit() => {
|
||||
*control_flow = winit::event_loop::ControlFlow::Exit;
|
||||
}
|
||||
_ => {}
|
||||
@@ -363,7 +363,7 @@ pub fn run_wgpu(
|
||||
winit::event::WindowEvent::ScaleFactorChanged { new_inner_size, .. } => {
|
||||
painter.on_window_resized(new_inner_size.width, new_inner_size.height);
|
||||
}
|
||||
winit::event::WindowEvent::CloseRequested => {
|
||||
winit::event::WindowEvent::CloseRequested if integration.should_quit() => {
|
||||
*control_flow = winit::event_loop::ControlFlow::Exit;
|
||||
}
|
||||
_ => {}
|
||||
|
||||
Reference in New Issue
Block a user