diff options
| author | 2020-12-15 06:44:00 +0100 | |
|---|---|---|
| committer | 2020-12-15 06:44:00 +0100 | |
| commit | 056f7e6951f6e96da82f35626b8920f6853bea43 (patch) | |
| tree | 73c9e2dd30299b06f070b8836986add676136fa0 /winit | |
| parent | 3bdf931925067acbaabf040f6c437a54640ed1a0 (diff) | |
| download | iced-056f7e6951f6e96da82f35626b8920f6853bea43.tar.gz iced-056f7e6951f6e96da82f35626b8920f6853bea43.tar.bz2 iced-056f7e6951f6e96da82f35626b8920f6853bea43.zip | |
Change cursor position on touch event
Diffstat (limited to '')
| -rw-r--r-- | winit/src/application/state.rs | 7 | 
1 files changed, 5 insertions, 2 deletions
| diff --git a/winit/src/application/state.rs b/winit/src/application/state.rs index 58bc7ed6..46297370 100644 --- a/winit/src/application/state.rs +++ b/winit/src/application/state.rs @@ -2,7 +2,7 @@ use crate::conversion;  use crate::{Application, Color, Debug, Mode, Point, Size, Viewport};  use std::marker::PhantomData; -use winit::event::WindowEvent; +use winit::event::{Touch, WindowEvent};  use winit::window::Window;  /// The state of a windowed [`Application`]. @@ -128,7 +128,10 @@ impl<A: Application> State<A> {                  self.viewport_version = self.viewport_version.wrapping_add(1);              } -            WindowEvent::CursorMoved { position, .. } => { +            WindowEvent::CursorMoved { position, .. } +            | WindowEvent::Touch(Touch { +                location: position, .. +            }) => {                  self.cursor_position = *position;              }              WindowEvent::CursorLeft { .. } => { | 
