mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-31 13:50:05 -04:00
Fix X11 scroll direction
This was inconsistent with the documented semantics of MouseScrollDelta.
This commit is contained in:
@@ -413,7 +413,8 @@ impl EventsLoop {
|
|||||||
device_id: did,
|
device_id: did,
|
||||||
delta: match info.orientation {
|
delta: match info.orientation {
|
||||||
ScrollOrientation::Horizontal => LineDelta(delta as f32, 0.0),
|
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,
|
phase: TouchPhase::Moved,
|
||||||
}});
|
}});
|
||||||
|
|||||||
Reference in New Issue
Block a user