1
0
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:
Emil Ernerfeldt
2021-06-24 16:24:05 +02:00
parent 182eb32b95
commit 749c5cbdc8
4 changed files with 47 additions and 18 deletions

View File

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