mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 06:10:06 -04:00
egui-winit: don't repaint when just moving window (#1980)
* Bug fix: reset repaint countdown when we pass it * eframe: debug-print what winit event caused a repaint * egui-winit: don't repaint when only moving window * fix docstring
This commit is contained in:
@@ -87,9 +87,11 @@ fn main() {
|
||||
*control_flow = glutin::event_loop::ControlFlow::Exit;
|
||||
}
|
||||
|
||||
egui_glium.on_event(&event);
|
||||
let event_response = egui_glium.on_event(&event);
|
||||
|
||||
display.gl_window().window().request_redraw(); // TODO(emilk): ask egui if the events warrants a repaint instead
|
||||
if event_response.repaint {
|
||||
display.gl_window().window().request_redraw();
|
||||
}
|
||||
}
|
||||
glutin::event::Event::NewEvents(glutin::event::StartCause::ResumeTimeReached {
|
||||
..
|
||||
|
||||
Reference in New Issue
Block a user