Avoid unnecessary frequent rerenders
This commit is contained in:
parent
5aeb81e800
commit
9934566414
|
|
@ -408,12 +408,12 @@ impl ApplicationHandler<UserEvent> for Application {
|
||||||
WindowEvent::Focused(new_focused) => {
|
WindowEvent::Focused(new_focused) => {
|
||||||
self.focused = new_focused.then_some(viewport_id);
|
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);
|
self.check_repaint(event_loop);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue