diff options
author | 2020-03-11 01:03:16 +0100 | |
---|---|---|
committer | 2020-03-11 01:03:16 +0100 | |
commit | 3f785472c4c43faf16e8e611bd0cec06ab1f9da9 (patch) | |
tree | 0146f9d60bdb6ad337463e4270c25e94db394338 /winit | |
parent | 5a91b52ef4066701d82a897b44a3f90412f210d2 (diff) | |
parent | aac7ad3e14aaa9faf7d52fe9b91bc64cb037d576 (diff) | |
download | iced-3f785472c4c43faf16e8e611bd0cec06ab1f9da9.tar.gz iced-3f785472c4c43faf16e8e611bd0cec06ab1f9da9.tar.bz2 iced-3f785472c4c43faf16e8e611bd0cec06ab1f9da9.zip |
Merge pull request #215 from hecrj/improvement/update-winit
Update `winit` to `0.22`
Diffstat (limited to 'winit')
-rw-r--r-- | winit/Cargo.toml | 2 | ||||
-rw-r--r-- | winit/src/application.rs | 9 |
2 files changed, 4 insertions, 7 deletions
diff --git a/winit/Cargo.toml b/winit/Cargo.toml index 63df1d63..a70ecb9d 100644 --- a/winit/Cargo.toml +++ b/winit/Cargo.toml @@ -14,7 +14,7 @@ categories = ["gui"] debug = [] [dependencies] -winit = "0.21" +winit = "0.22" log = "0.4" [dependencies.iced_native] diff --git a/winit/src/application.rs b/winit/src/application.rs index f5aa799c..891b8f12 100644 --- a/winit/src/application.rs +++ b/winit/src/application.rs @@ -347,6 +347,9 @@ pub trait Application: Sized { WindowEvent::CloseRequested => { *control_flow = ControlFlow::Exit; } + WindowEvent::ModifiersChanged(new_modifiers) => { + modifiers = new_modifiers; + } #[cfg(target_os = "macos")] WindowEvent::KeyboardInput { input: @@ -382,12 +385,6 @@ pub trait Application: Sized { events.push(event); } } - event::Event::DeviceEvent { - event: event::DeviceEvent::ModifiersChanged(new_modifiers), - .. - } => { - modifiers = new_modifiers; - } _ => { *control_flow = ControlFlow::Wait; } |