1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 14:20:04 -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

@@ -79,9 +79,11 @@ fn main() {
gl_window.resize(**new_inner_size);
}
egui_glow.on_event(&event);
let event_response = egui_glow.on_event(&event);
gl_window.window().request_redraw(); // TODO(emilk): ask egui if the events warrants a repaint instead
if event_response.repaint {
gl_window.window().request_redraw();
}
}
glutin::event::Event::LoopDestroyed => {
egui_glow.destroy();