diff options
author | 2024-10-23 19:37:28 +0200 | |
---|---|---|
committer | 2024-11-05 23:52:57 +0100 | |
commit | 7908b6eba91b91c61f7839b3d52fbee124b55cc4 (patch) | |
tree | a79ad5a1ccf0776b1b2cbd4ae7b03118c71b41e1 /winit | |
parent | 46017c6483714a8245c090680e4810a621493f7c (diff) | |
download | iced-7908b6eba91b91c61f7839b3d52fbee124b55cc4.tar.gz iced-7908b6eba91b91c61f7839b3d52fbee124b55cc4.tar.bz2 iced-7908b6eba91b91c61f7839b3d52fbee124b55cc4.zip |
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
Diffstat (limited to 'winit')
-rw-r--r-- | winit/src/program.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/winit/src/program.rs b/winit/src/program.rs index a6729fa0..fb30ccd9 100644 --- a/winit/src/program.rs +++ b/winit/src/program.rs @@ -997,6 +997,13 @@ async fn run_instance<P, C>( if matches!( window_event, + winit::event::WindowEvent::Resized(_) + ) { + window.raw.request_redraw(); + } + + if matches!( + window_event, winit::event::WindowEvent::CloseRequested ) && window.exit_on_close_request { |