diff options
author | 2020-03-17 03:23:10 +0100 | |
---|---|---|
committer | 2020-03-17 03:23:10 +0100 | |
commit | c7583f12270082dc2f4d766aea50be7bd49b6c50 (patch) | |
tree | bf4529c0deec92a72f72a157b35299b6d1e7d4de /examples/integration/src/main.rs | |
parent | a373682fa4e8d57d66707faef1fb6b373f4297eb (diff) | |
parent | 9da6ce474c2cd178ca5365d46760ba0882ce7121 (diff) | |
download | iced-c7583f12270082dc2f4d766aea50be7bd49b6c50.tar.gz iced-c7583f12270082dc2f4d766aea50be7bd49b6c50.tar.bz2 iced-c7583f12270082dc2f4d766aea50be7bd49b6c50.zip |
Merge branch 'master' into feature/panes-widget
Diffstat (limited to 'examples/integration/src/main.rs')
-rw-r--r-- | examples/integration/src/main.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/examples/integration/src/main.rs b/examples/integration/src/main.rs index 4be913c1..2cb89ffc 100644 --- a/examples/integration/src/main.rs +++ b/examples/integration/src/main.rs @@ -10,7 +10,7 @@ use iced_wgpu::{ use iced_winit::{winit, Cache, Clipboard, MouseCursor, Size, UserInterface}; use winit::{ - event::{DeviceEvent, Event, ModifiersState, WindowEvent}, + event::{Event, ModifiersState, WindowEvent}, event_loop::{ControlFlow, EventLoop}, }; @@ -66,14 +66,11 @@ pub fn main() { *control_flow = ControlFlow::Wait; match event { - Event::DeviceEvent { - event: DeviceEvent::ModifiersChanged(new_modifiers), - .. - } => { - modifiers = new_modifiers; - } Event::WindowEvent { event, .. } => { match event { + WindowEvent::ModifiersChanged(new_modifiers) => { + modifiers = new_modifiers; + } WindowEvent::Resized(new_size) => { logical_size = new_size.to_logical(window.scale_factor()); @@ -82,6 +79,7 @@ pub fn main() { WindowEvent::CloseRequested => { *control_flow = ControlFlow::Exit; } + _ => {} } |