]> gitweb.factorcode.org Git - factor.git/blobdiff - library/ui/cocoa/view-utils.factor
Horizontal scrolling with the mouse wheel is now supported
[factor.git] / library / ui / cocoa / view-utils.factor
index 60fd4aacd3e88b371b8ec478d392e53421b45766..3d895f53c95b128b4f47607cd02d9d90fe4e9e82 100644 (file)
@@ -100,8 +100,10 @@ opengl sequences ;
     mouse-location rot window send-button-up ;
 
 : send-wheel$ ( view event -- )
-    [ -> deltaY 0 > ] 2keep mouse-location
-    rot window send-wheel ;
+    over >r
+    dup -> deltaX sgn neg over -> deltaY sgn neg 2array -rot
+    mouse-location
+    r> window send-wheel ;
 
 : send-action$ ( view event gesture -- junk )
     >r drop window r> send-action f ;