Fix crash caused by WM_PAINT getting invoked at inopportune times. (#866)

This commit is contained in:
Osspial 2019-05-16 00:00:30 -04:00 committed by GitHub
parent d5391686ae
commit 6ff1370035
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 18 deletions

View file

@ -21,6 +21,7 @@ fn main() {
Event::NewEvents(StartCause::ResumeTimeReached{..}) => {
*control_flow = ControlFlow::WaitUntil(Instant::now() + Duration::new(1, 0));
println!("\nTimer\n");
_window.set_inner_size(winit::dpi::LogicalSize::new(300.0, 300.0));
},
Event::WindowEvent {
event: WindowEvent::CloseRequested,