mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-30 21:30:03 -04:00
Add phases to wheel events.
Needed for apps to support overscroll on the Mac.
This commit is contained in:
committed by
Jack Moffitt
parent
2638db665a
commit
7886ff9acd
@@ -1,5 +1,6 @@
|
||||
use std::collections::HashSet;
|
||||
|
||||
use TouchPhase;
|
||||
use Event as GlutinEvent;
|
||||
use ElementState;
|
||||
use MouseButton;
|
||||
@@ -98,7 +99,8 @@ pub fn translate_event(
|
||||
WlPointerAxis::HorizontalScroll => {
|
||||
MouseScrollDelta::PixelDelta(0.0, amplitude as f32)
|
||||
}
|
||||
}
|
||||
},
|
||||
TouchPhase::Moved
|
||||
), surface))
|
||||
} else {
|
||||
None
|
||||
@@ -107,4 +109,4 @@ pub fn translate_event(
|
||||
},
|
||||
_ => None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user