aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/x11
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2016-03-02 16:13:13 -0800
committerJack Moffitt <jack@metajack.im>2016-03-03 16:49:35 -0700
commit7886ff9acdbc4961359725536c1a15e2cbb3d4f5 (patch)
tree1243ddf9e5b337b0b8ad91eabc269ce429072a4b /src/api/x11
parent2638db665afc175cf128c3e25bc883f4c114bb5a (diff)
downloadglutin-7886ff9acdbc4961359725536c1a15e2cbb3d4f5.tar.gz
glutin-7886ff9acdbc4961359725536c1a15e2cbb3d4f5.zip
Add phases to wheel events.
Needed for apps to support overscroll on the Mac.
Diffstat (limited to 'src/api/x11')
-rw-r--r--src/api/x11/input.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/api/x11/input.rs b/src/api/x11/input.rs
index 2ebc989..a05b22e 100644
--- a/src/api/x11/input.rs
+++ b/src/api/x11/input.rs
@@ -201,7 +201,7 @@ impl XInputEventHandler {
} else {
-1.0
};
- Some(MouseWheel(LineDelta(0.0, delta)))
+ Some(MouseWheel(LineDelta(0.0, delta), TouchPhase::Moved))
} else {
// emulated button event from a touch/smooth-scroll
// event. Ignore these events and handle scrolling
@@ -235,7 +235,8 @@ impl XInputEventHandler {
}
if scroll_delta.0.abs() > 0.0 || scroll_delta.1.abs() > 0.0 {
- Some(MouseWheel(LineDelta(scroll_delta.0 as f32, scroll_delta.1 as f32)))
+ Some(MouseWheel(LineDelta(scroll_delta.0 as f32, scroll_delta.1 as f32),
+ TouchPhase::Moved))
} else {
let new_cursor_pos = (event_data.event_x, event_data.event_y);
if new_cursor_pos != self.current_state.cursor_pos {