Browse Source

Fix exit handling (#1696)

pull/1700/head
Erdal Acar 2 years ago
committed by GitHub
parent
commit
7987920f7e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      eframe/src/native/run.rs

4
eframe/src/native/run.rs

@ -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;
}
_ => {}

Loading…
Cancel
Save