Add phases to wheel events.

Needed for apps to support overscroll on the Mac.
This commit is contained in:
Patrick Walton 2016-03-02 16:13:13 -08:00 committed by Jack Moffitt
parent 2638db665a
commit 7886ff9acd
5 changed files with 19 additions and 10 deletions

View file

@ -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
}
}
}