mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-02 23:00:05 -04:00
if letify
This commit is contained in:
@@ -115,14 +115,11 @@ extern fn window_did_resize(this: id, _: id) -> id {
|
||||
|
||||
let _: id = msg_send()(state.context, selector("update"));
|
||||
|
||||
match state.handler {
|
||||
Some(handler) => {
|
||||
if let Some(handler) = state.handler {
|
||||
let rect = NSView::frame(state.view);
|
||||
let scale_factor = state.window.backingScaleFactor() as f32;
|
||||
(handler)((scale_factor * rect.size.width as f32) as u32, (scale_factor * rect.size.height as f32) as u32);
|
||||
}
|
||||
None => {}
|
||||
}
|
||||
}
|
||||
0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user