From c030065af7bcc6d11e963f287dae29aebe0a089e Mon Sep 17 00:00:00 2001 From: pierre Date: Tue, 5 Jan 2021 20:54:10 +0100 Subject: [PATCH] app: fixed swapped horizontal scrolling directions on Windows Signed-off-by: pierre --- app/internal/window/os_windows.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/internal/window/os_windows.go b/app/internal/window/os_windows.go index e6168c8f..ae29073f 100644 --- a/app/internal/window/os_windows.go +++ b/app/internal/window/os_windows.go @@ -373,9 +373,11 @@ func (w *window) scrollEvent(wParam, lParam uintptr, horizontal bool) { windows.ScreenToClient(w.hwnd, &np) p := f32.Point{X: float32(np.X), Y: float32(np.Y)} dist := float32(int16(wParam >> 16)) - sp := f32.Point{Y: -dist} + var sp f32.Point if horizontal { - sp.X, sp.Y = sp.Y, sp.X + sp.X = dist + } else { + sp.Y = -dist } w.w.Event(pointer.Event{ Type: pointer.Scroll,