Request a redraw when a window is resized
If we do not request it, macOS does not get any `RedrawRequested` events. Shouldn't `winit` [take care of this]? Probably a bug. [take care of this]: https://docs.rs/winit/0.30.5/winit/event/enum.WindowEvent.html#variant.RedrawRequested
This commit is contained in:
parent
46017c6483
commit
7908b6eba9
1 changed files with 7 additions and 0 deletions
|
|
@ -995,6 +995,13 @@ async fn run_instance<P, C>(
|
|||
continue;
|
||||
};
|
||||
|
||||
if matches!(
|
||||
window_event,
|
||||
winit::event::WindowEvent::Resized(_)
|
||||
) {
|
||||
window.raw.request_redraw();
|
||||
}
|
||||
|
||||
if matches!(
|
||||
window_event,
|
||||
winit::event::WindowEvent::CloseRequested
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue