1
0
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:
Emil Ernerfeldt
2022-08-29 11:20:19 +02:00
committed by GitHub
parent 9b2c3d1026
commit ac4d75e9b4
8 changed files with 139 additions and 62 deletions

View File

@@ -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 {
..