Add phases to wheel events.
Needed for apps to support overscroll on the Mac.
This commit is contained in:
parent
2638db665a
commit
7886ff9acd
5 changed files with 19 additions and 10 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue