fix(wry): ControlFlow must be set to Wait for performance reasons (#1688)

This commit is contained in:
Lucas Fernandes Nogueira
2021-05-03 12:24:18 -03:00
committed by GitHub
parent b86fe9a6de
commit 836ee60dc8

View File

@@ -508,7 +508,7 @@ impl Runtime for Wry {
fn run(self) {
let mut webviews = self.webviews;
self.event_loop.run(move |event, event_loop, control_flow| {
*control_flow = ControlFlow::Poll;
*control_flow = ControlFlow::Wait;
for (_, w) in webviews.iter() {
if let Err(e) = w.evaluate_script() {