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
|
! Copyright (C) 2016 Björn Lindqvist
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors arrays assocs columns kernel literals math sequences
|
USING: accessors assocs kernel literals ui.gestures x11.keysymdef ;
|
||||||
sets ui.gestures x11.keysymdef ;
|
|
||||||
IN: ui.backend.x11.keys
|
IN: ui.backend.x11.keys
|
||||||
|
|
||||||
CONSTANT: modifiers
|
CONSTANT: modifiers
|
||||||
|
@ -63,9 +62,5 @@ CONSTANT: codes
|
||||||
: code>sym ( code -- name/code/f action? )
|
: code>sym ( code -- name/code/f action? )
|
||||||
dup codes at* [ nip dup t and ] when ;
|
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 )
|
: event-modifiers ( event -- seq )
|
||||||
state>> modifiers modifier ;
|
state>> modifiers modifier ;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
! Copyright (C) 2005, 2010 Slava Pestov.
|
! Copyright (C) 2005, 2010 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! 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
|
combinators combinators.short-circuit deques fry kernel make math
|
||||||
math.order math.parser math.vectors namespaces sequences system timers
|
math.order math.parser math.vectors namespaces sequences sets system
|
||||||
ui.gadgets ui.gadgets.private words ;
|
timers ui.gadgets ui.gadgets.private words ;
|
||||||
IN: ui.gestures
|
IN: ui.gestures
|
||||||
|
|
||||||
: get-gesture-handler ( gesture gadget -- quot )
|
: get-gesture-handler ( gesture gadget -- quot )
|
||||||
|
@ -233,6 +233,10 @@ SYMBOL: drag-timer
|
||||||
focus<<
|
focus<<
|
||||||
] if ;
|
] if ;
|
||||||
|
|
||||||
|
: modifier ( mod modifiers -- seq )
|
||||||
|
[ second swap bitand 0 > ] with filter
|
||||||
|
0 <column> members [ f ] [ >array ] if-empty ;
|
||||||
|
|
||||||
: drag-loc ( -- loc )
|
: drag-loc ( -- loc )
|
||||||
hand-loc get-global hand-click-loc get-global v- ;
|
hand-loc get-global hand-click-loc get-global v- ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue