]> gitweb.factorcode.org Git - factor.git/commitdiff
ui.backend.windows: scroll 10 times faster with Shift
authorAlexander Ilin <alex.ilin@protonmail.com>
Sun, 25 Feb 2024 16:41:47 +0000 (17:41 +0100)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sun, 25 Feb 2024 17:24:44 +0000 (09:24 -0800)
basis/ui/backend/windows/windows.factor

index f2a37f58d35cf8578fdac3bdd76a8553e71f3f9e..4057e9899a2a8cffc501e9f924502c113b7a7548 100644 (file)
@@ -436,11 +436,14 @@ SYMBOL: nc-buttons
     message>button nc-buttons get
     swap [ push ] [ remove! drop ] if ;
 
+: scroll-distance ( wParam -- n )
+    [ hi-word 80 /f ] [ lo-word ] bi MK_SHIFT mask? [ 10 * ] when ;
+
 : mouse-scroll ( wParam -- direction )
-    hi-word -80 /f 0 swap 2array ;
+    scroll-distance neg 0 swap 2array ;
 
 : mouse-horizontal-scroll ( wParam -- direction )
-    hi-word 80 /f 0 2array ;
+    scroll-distance 0 2array ;
 
 : mouse-event>gesture ( uMsg -- button )
     key-modifiers swap message>button