]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/ui/gestures/gestures.factor
ui.gestures: fix the cocoa ui backend which i broke by moving the modifier word
[factor.git] / basis / ui / gestures / gestures.factor
index 6c8b3049c584840984a0b52a0adf8e8dfbebdeb0..833f642236355e99c748c80b98c0c5b950b61810 100644 (file)
@@ -1,9 +1,9 @@
 ! Copyright (C) 2005, 2010 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays ascii assocs boxes calendar classes
+USING: accessors arrays ascii assocs boxes calendar classes columns
 combinators combinators.short-circuit deques fry kernel make math
-math.order math.parser math.vectors namespaces sequences system timers
-ui.gadgets ui.gadgets.private words ;
+math.order math.parser math.vectors namespaces sequences sets system
+timers ui.gadgets ui.gadgets.private words ;
 IN: ui.gestures
 
 : get-gesture-handler ( gesture gadget -- quot )
@@ -233,6 +233,10 @@ SYMBOL: drag-timer
         focus<<
     ] if ;
 
+: modifier ( mod modifiers -- seq )
+    [ second swap bitand 0 > ] with filter
+    0 <column> members [ f ] [ >array ] if-empty ;
+
 : drag-loc ( -- loc )
     hand-loc get-global hand-click-loc get-global v- ;