diff options
| author | 2023-07-06 06:41:28 +0200 | |
|---|---|---|
| committer | 2023-07-06 06:41:28 +0200 | |
| commit | cc32bd4de09ee58c15d1b3f2cec4a79dc65dd035 (patch) | |
| tree | 6b7494f453834a155596daf5c6e885fec44302e8 /winit/src/application | |
| parent | b394c84b37eacb266d45663d5d6626f1b616af7e (diff) | |
| download | iced-cc32bd4de09ee58c15d1b3f2cec4a79dc65dd035.tar.gz iced-cc32bd4de09ee58c15d1b3f2cec4a79dc65dd035.tar.bz2 iced-cc32bd4de09ee58c15d1b3f2cec4a79dc65dd035.zip  | |
Use `Size` in both `Resize` and `FetchSize` window actions
Diffstat (limited to '')
| -rw-r--r-- | winit/src/application.rs | 11 | 
1 files changed, 7 insertions, 4 deletions
diff --git a/winit/src/application.rs b/winit/src/application.rs index b0824e0e..afc523b6 100644 --- a/winit/src/application.rs +++ b/winit/src/application.rs @@ -741,17 +741,20 @@ pub fn run_command<A, E>(                  window::Action::Drag => {                      let _res = window.drag_window();                  } -                window::Action::Resize { width, height } => { +                window::Action::Resize(size) => {                      window.set_inner_size(winit::dpi::LogicalSize { -                        width, -                        height, +                        width: size.width, +                        height: size.height,                      });                  }                  window::Action::FetchSize(callback) => {                      let size = window.inner_size();                      proxy -                        .send_event(callback((size.width, size.height))) +                        .send_event(callback(Size::new( +                            size.width, +                            size.height, +                        )))                          .expect("Send message to event loop")                  }                  window::Action::Maximize(maximized) => {  | 
