diff --git a/examples/src/bin/glupload.rs b/examples/src/bin/glupload.rs index 428729fb9..b86e28f8e 100644 --- a/examples/src/bin/glupload.rs +++ b/examples/src/bin/glupload.rs @@ -618,7 +618,16 @@ fn main_loop(mut app: App) -> Result match event { - glutin::WindowEvent::CloseRequested => running = false, + glutin::WindowEvent::CloseRequested + | glutin::WindowEvent::KeyboardInput { + input: + glutin::KeyboardInput { + state: glutin::ElementState::Released, + virtual_keycode: Some(glutin::VirtualKeyCode::Escape), + .. + }, + .. + } => running = false, glutin::WindowEvent::Resized(logical_size) => { let dpi_factor = windowed_context.window().get_hidpi_factor(); windowed_context.resize(logical_size.to_physical(dpi_factor));