Avoid unnecessary frequent rerenders
This commit is contained in:
+3
-3
@@ -408,12 +408,12 @@ impl ApplicationHandler<UserEvent> for Application {
|
||||
WindowEvent::Focused(new_focused) => {
|
||||
self.focused = new_focused.then_some(viewport_id);
|
||||
}
|
||||
WindowEvent::RedrawRequested => {
|
||||
self.repaint_all(event_loop);
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
if response.repaint {
|
||||
self.repaint_all(event_loop);
|
||||
}
|
||||
self.check_repaint(event_loop);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user