From: Alexander Ilin Date: Sun, 25 Feb 2024 14:56:26 +0000 (+0100) Subject: ui.backend.windows: fix mouse-scroll implementation X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=589244bb689a2c79b9ac952828b0eca735022f61 ui.backend.windows: fix mouse-scroll implementation The lo-word should be ignored: it contains flags that should not affect the scroll direction vector. --- 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 ;