[PATCH gio] app: fixed swapped horizontal scrolling directions on Windows
Export this patch
From: pierre <pierre.curto@gmail.com>
Signed-off-by: pierre <pierre.curto@gmail.com>
---
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 e6168c8..ae29073 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,
--
2.26.2
Thanks, applied.
Elias