summaryrefslogtreecommitdiffstats
path: root/winit/src/conversion.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-08-25 10:58:15 +0200
committerLibravatar GitHub <noreply@github.com>2020-08-25 10:58:15 +0200
commitfb015a85d22a7c4632bd251127a89259bfd0c346 (patch)
tree6b5f960227e8b9f5233f89da7f05fa6257395183 /winit/src/conversion.rs
parent56273c5a3cd60a9722af7015ebc59341a1e75f2c (diff)
parent72f89ba77f45e5345ef863d5e75b99895419f583 (diff)
downloadiced-fb015a85d22a7c4632bd251127a89259bfd0c346.tar.gz
iced-fb015a85d22a7c4632bd251127a89259bfd0c346.tar.bz2
iced-fb015a85d22a7c4632bd251127a89259bfd0c346.zip
Merge pull request #496 from hecrj/fix/cursor-position-on-leave
Fix cursor position after a `CursorLeft` event
Diffstat (limited to 'winit/src/conversion.rs')
-rw-r--r--winit/src/conversion.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/winit/src/conversion.rs b/winit/src/conversion.rs
index 3a8f54f5..638787ab 100644
--- a/winit/src/conversion.rs
+++ b/winit/src/conversion.rs
@@ -40,6 +40,12 @@ pub fn window_event(
y: position.y as f32,
}))
}
+ WindowEvent::CursorEntered { .. } => {
+ Some(Event::Mouse(mouse::Event::CursorEntered))
+ }
+ WindowEvent::CursorLeft { .. } => {
+ Some(Event::Mouse(mouse::Event::CursorLeft))
+ }
WindowEvent::MouseInput { button, state, .. } => {
let button = mouse_button(*button);