~eliasnaur/gio-patches

gio: app: fixed swapped horizontal scrolling directions on Windows v1 PROPOSED

~pierrec
~pierrec: 1
 app: fixed swapped horizontal scrolling directions on Windows

 1 files changed, 4 insertions(+), 2 deletions(-)
#387716 apple.yml success
#387717 freebsd.yml success
#387718 linux.yml success
#387719 openbsd.yml success
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~eliasnaur/gio-patches/patches/16382/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH gio] app: fixed swapped horizontal scrolling directions on Windows Export this patch

~pierrec
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