Skip to content

Commit

Permalink
fix: correct event types for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
netraptor authored and wash2 committed Nov 25, 2024
1 parent 630612a commit aee94ca
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions winit/src/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ where
#[cfg(target_os = "windows")]
let is_move_or_resize = matches!(
event,
winit::event::WindowEvent::Resized(_)
winit::event::WindowEvent::SurfaceResized(_)
| winit::event::WindowEvent::Moved(_)
);

Expand All @@ -331,12 +331,7 @@ where
#[cfg(target_os = "windows")]
{
if is_move_or_resize {
self.process_event(
event_loop,
Event::EventLoopAwakened(
winit::event::Event::AboutToWait,
),
);
self.process_event(event_loop, Some(Event::AboutToWait));
}
}
}
Expand Down

0 comments on commit aee94ca

Please sign in to comment.