summaryrefslogtreecommitdiffstats
path: root/native/src/user_interface.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-04-17 23:27:50 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-04-17 23:27:50 +0200
commitae546a5b9d10c746ff1785d220397269ff847eee (patch)
tree41a6965798efc2b86ce21781a1e8f79de204dac8 /native/src/user_interface.rs
parentb44f14e1863d251cc960a6252c8d0110f3062215 (diff)
downloadiced-ae546a5b9d10c746ff1785d220397269ff847eee.tar.gz
iced-ae546a5b9d10c746ff1785d220397269ff847eee.tar.bz2
iced-ae546a5b9d10c746ff1785d220397269ff847eee.zip
Revert "Merge pull request #289 from hecrj/fix/cursor-events"
`winit` seems to produce `CursorEntered` and `CursorLeft` events after wheel scrolling for no apparent reason (?). This causes annoying flickering when hovering some widgets on a scrollable. I should investigate this further. We are rolling back the fix for the time being.
Diffstat (limited to 'native/src/user_interface.rs')
-rw-r--r--native/src/user_interface.rs11
1 files changed, 2 insertions, 9 deletions
diff --git a/native/src/user_interface.rs b/native/src/user_interface.rs
index 88ffd6d6..5d9221e9 100644
--- a/native/src/user_interface.rs
+++ b/native/src/user_interface.rs
@@ -188,15 +188,8 @@ where
let mut messages = Vec::new();
for event in events {
- match event {
- Event::Mouse(mouse::Event::CursorMoved { x, y }) => {
- self.cursor_position = Point::new(x, y);
- }
- Event::Mouse(mouse::Event::CursorLeft) => {
- // TODO: Encode cursor availability
- self.cursor_position = Point::new(-1.0, -1.0);
- }
- _ => {}
+ if let Event::Mouse(mouse::Event::CursorMoved { x, y }) = event {
+ self.cursor_position = Point::new(x, y);
}
self.root.widget.on_event(