summaryrefslogtreecommitdiffstats
path: root/winit/src
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-04-13 04:33:39 +0200
committerLibravatar GitHub <noreply@github.com>2020-04-13 04:33:39 +0200
commitbc70ba12f1573599a53c7e21f34f4dc6422c56e0 (patch)
treea63bbdffb2062954b5e00c5066c04dada053a4e9 /winit/src
parente941eab4ab58da4473dd4473215bc4f36684dafb (diff)
parentf652e84187336c8bdd9bee32c0afeda7b14796b3 (diff)
downloadiced-bc70ba12f1573599a53c7e21f34f4dc6422c56e0.tar.gz
iced-bc70ba12f1573599a53c7e21f34f4dc6422c56e0.tar.bz2
iced-bc70ba12f1573599a53c7e21f34f4dc6422c56e0.zip
Merge pull request #289 from hecrj/fix/cursor-events
Produce and handle `CursorEntered` and `CursorLeft`
Diffstat (limited to '')
-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 eaa26ace..78686424 100644
--- a/winit/src/conversion.rs
+++ b/winit/src/conversion.rs
@@ -27,6 +27,12 @@ pub fn window_event(
height: logical_size.height,
}))
}
+ WindowEvent::CursorEntered { .. } => {
+ Some(Event::Mouse(mouse::Event::CursorEntered))
+ }
+ WindowEvent::CursorLeft { .. } => {
+ Some(Event::Mouse(mouse::Event::CursorLeft))
+ }
WindowEvent::CursorMoved { position, .. } => {
let position = position.to_logical::<f64>(scale_factor);