From 589244bb689a2c79b9ac952828b0eca735022f61 Mon Sep 17 00:00:00 2001 From: Alexander Ilin Date: Sun, 25 Feb 2024 15:56:26 +0100 Subject: [PATCH] ui.backend.windows: fix mouse-scroll implementation The lo-word should be ignored: it contains flags that should not affect the scroll direction vector. --- basis/ui/backend/windows/windows.factor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basis/ui/backend/windows/windows.factor b/basis/ui/backend/windows/windows.factor index 9dba6fed92..f2a37f58d3 100644 --- a/basis/ui/backend/windows/windows.factor +++ b/basis/ui/backend/windows/windows.factor @@ -436,8 +436,8 @@ SYMBOL: nc-buttons message>button nc-buttons get swap [ push ] [ remove! drop ] if ; -: mouse-scroll ( wParam -- array ) - >lo-hi [ -80 /f ] map ; +: mouse-scroll ( wParam -- direction ) + hi-word -80 /f 0 swap 2array ; : mouse-horizontal-scroll ( wParam -- direction ) hi-word 80 /f 0 2array ; -- 2.34.1