mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 13:50:04 -04:00
egui_glium: don't take control of the control_flow
Closes https://github.com/emilk/egui/issues/434
This commit is contained in:
@@ -90,7 +90,12 @@ fn main() {
|
||||
glutin::event::Event::RedrawRequested(_) if !cfg!(windows) => redraw(),
|
||||
|
||||
glutin::event::Event::WindowEvent { event, .. } => {
|
||||
egui.on_event(event, control_flow);
|
||||
if egui.is_quit_event(&event) {
|
||||
*control_flow = glium::glutin::event_loop::ControlFlow::Exit;
|
||||
}
|
||||
|
||||
egui.on_event(&event);
|
||||
|
||||
display.gl_window().window().request_redraw(); // TODO: ask egui if the events warrants a repaint instead
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user