ui.gestures: fix the cocoa ui backend which i broke by moving the modifier word
parent
75a3e191b2
commit
0a34002988
|
@ -1,7 +1,6 @@
|
|||
! Copyright (C) 2016 Björn Lindqvist
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: accessors arrays assocs columns kernel literals math sequences
|
||||
sets ui.gestures x11.keysymdef ;
|
||||
USING: accessors assocs kernel literals ui.gestures x11.keysymdef ;
|
||||
IN: ui.backend.x11.keys
|
||||
|
||||
CONSTANT: modifiers
|
||||
|
@ -63,9 +62,5 @@ CONSTANT: codes
|
|||
: code>sym ( code -- name/code/f action? )
|
||||
dup codes at* [ nip dup t and ] when ;
|
||||
|
||||
: modifier ( mod modifiers -- seq )
|
||||
[ second swap bitand 0 > ] with filter
|
||||
0 <column> members [ f ] [ >array ] if-empty ;
|
||||
|
||||
: event-modifiers ( event -- seq )
|
||||
state>> modifiers modifier ;
|
||||
|
|
|
@ -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- ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue