Skip to content

Commit

Permalink
Fix timer not firing on Windows
Browse files Browse the repository at this point in the history
If we set the control flow to Wait, winit will always wait even if we
set the control flow later to some smaller timeout in the AboutToWait
event.
Wait is the default anyway in winit 0.29 so this is not required

I'd say this is a bug in winit, but we can easily work it around

Fix #3875
  • Loading branch information
ogoffart committed Nov 7, 2023
1 parent d82e3d4 commit a88737a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions internal/backends/winit/event_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,6 @@ impl EventLoopState {
}

Event::NewEvents(_) => {
event_loop_target.set_control_flow(ControlFlow::Wait);

self.windows_with_pending_redraw_requests.clear();
ALL_WINDOWS.with(|windows| {
for (window_id, window_weak) in windows.borrow().iter() {
Expand Down

0 comments on commit a88737a

Please sign in to comment.