Reverse horizontal scroll direction (#2105)
This commit is contained in:
parent
1c68be0631
commit
85baf79d17
8 changed files with 46 additions and 26 deletions
|
|
@ -193,9 +193,9 @@ pub(super) fn handle_pointer(
|
|||
|
||||
// Old seat compatibility.
|
||||
match axis {
|
||||
// Wayland vertical sign convention is the inverse of winit.
|
||||
// Wayland sign convention is the inverse of winit.
|
||||
wl_pointer::Axis::VerticalScroll => y -= value as f32,
|
||||
wl_pointer::Axis::HorizontalScroll => x += value as f32,
|
||||
wl_pointer::Axis::HorizontalScroll => x -= value as f32,
|
||||
_ => unreachable!(),
|
||||
}
|
||||
|
||||
|
|
@ -216,9 +216,9 @@ pub(super) fn handle_pointer(
|
|||
} else {
|
||||
let (mut x, mut y) = pointer_data.axis_data.axis_buffer.unwrap_or((0.0, 0.0));
|
||||
match axis {
|
||||
// Wayland vertical sign convention is the inverse of winit.
|
||||
// Wayland sign convention is the inverse of winit.
|
||||
wl_pointer::Axis::VerticalScroll => y -= value as f32,
|
||||
wl_pointer::Axis::HorizontalScroll => x += value as f32,
|
||||
wl_pointer::Axis::HorizontalScroll => x -= value as f32,
|
||||
_ => unreachable!(),
|
||||
}
|
||||
|
||||
|
|
@ -237,9 +237,9 @@ pub(super) fn handle_pointer(
|
|||
.unwrap_or((0., 0.));
|
||||
|
||||
match axis {
|
||||
// Wayland vertical sign convention is the inverse of winit.
|
||||
// Wayland sign convention is the inverse of winit.
|
||||
wl_pointer::Axis::VerticalScroll => y -= discrete as f32,
|
||||
wl_pointer::Axis::HorizontalScroll => x += discrete as f32,
|
||||
wl_pointer::Axis::HorizontalScroll => x -= discrete as f32,
|
||||
_ => unreachable!(),
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue