diff options
Diffstat (limited to 'winit/src/program.rs')
-rw-r--r-- | winit/src/program.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/winit/src/program.rs b/winit/src/program.rs index c5c3133d..54221c68 100644 --- a/winit/src/program.rs +++ b/winit/src/program.rs @@ -1291,7 +1291,7 @@ fn run_action<P, C>( } } window::Action::GetPosition(id, channel) => { - if let Some(window) = window_manager.get_mut(id) { + if let Some(window) = window_manager.get(id) { let position = window .raw .inner_position() @@ -1306,6 +1306,13 @@ fn run_action<P, C>( let _ = channel.send(position); } } + window::Action::GetScaleFactor(id, channel) => { + if let Some(window) = window_manager.get_mut(id) { + let scale_factor = window.raw.scale_factor(); + + let _ = channel.send(scale_factor as f32); + } + } window::Action::Move(id, position) => { if let Some(window) = window_manager.get_mut(id) { window.raw.set_outer_position( |