Skip to content

Commit 29e34b8

Browse files
committed
Implement revamped RedrawRequested on Windows (#1050)
* Move event loop runner to runner module * Implement new redraw API
1 parent 3c24690 commit 29e34b8

File tree

4 files changed

+466
-428
lines changed

4 files changed

+466
-428
lines changed

examples/window.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ fn main() {
2020
event: WindowEvent::CloseRequested,
2121
window_id,
2222
} if window_id == window.id() => *control_flow = ControlFlow::Exit,
23-
_ => *control_flow = ControlFlow::Wait,
23+
Event::MainEventsCleared => {
24+
window.request_redraw();
25+
}
26+
_ => *control_flow = ControlFlow::Poll,
2427
}
2528
});
2629
}

0 commit comments

Comments
 (0)