Fix X11 scroll direction

This was inconsistent with the documented semantics of MouseScrollDelta.
This commit is contained in:
Benjamin Saunders committed 2017-07-17 23:52:28 -07:00
1 parent 2171918023
commit 506e830cb0
1 file changed
+2 -1
+2 -1
View File
@@ -413,7 +413,8 @@ impl EventsLoop {
device_id: did,
delta: match info.orientation {
ScrollOrientation::Horizontal => LineDelta(delta as f32, 0.0),
ScrollOrientation::Vertical => LineDelta(0.0, delta as f32),
// X11 vertical scroll coordinates are opposite to winit's
ScrollOrientation::Vertical => LineDelta(0.0, -delta as f32),
},
phase: TouchPhase::Moved,
}});