summaryrefslogtreecommitdiffstats
path: root/winit/src/application.rs
diff options
context:
space:
mode:
Diffstat (limited to 'winit/src/application.rs')
-rw-r--r--winit/src/application.rs17
1 files changed, 16 insertions, 1 deletions
diff --git a/winit/src/application.rs b/winit/src/application.rs
index d7d7660e..5aefb378 100644
--- a/winit/src/application.rs
+++ b/winit/src/application.rs
@@ -164,7 +164,22 @@ where
return;
}
- if let Some(event) = event.to_static() {
+ let event = match event {
+ winit::event::Event::WindowEvent {
+ event:
+ winit::event::WindowEvent::ScaleFactorChanged {
+ new_inner_size,
+ ..
+ },
+ window_id,
+ } => Some(winit::event::Event::WindowEvent {
+ event: winit::event::WindowEvent::Resized(*new_inner_size),
+ window_id,
+ }),
+ _ => event.to_static(),
+ };
+
+ if let Some(event) = event {
sender.start_send(event).expect("Send event");
let poll = instance.as_mut().poll(&mut context);