ui.backend.cocoa.views: use queued-gesture for touchbar commands.
parent
b0ded020ea
commit
f33bf70ad6
|
@ -169,9 +169,17 @@ CONSTANT: selector>action H{
|
||||||
] map-find
|
] map-find
|
||||||
] [ f f ] if* ;
|
] [ f f ] if* ;
|
||||||
|
|
||||||
|
TUPLE: send-touchbar-command target command ;
|
||||||
|
|
||||||
|
M: send-touchbar-command send-queued-gesture
|
||||||
|
[ target>> ] [ command>> ] bi invoke-command ;
|
||||||
|
|
||||||
: touchbar-invoke-command ( n -- )
|
: touchbar-invoke-command ( n -- )
|
||||||
[ touchbar-commands ] dip over
|
[ touchbar-commands ] dip over [
|
||||||
[ rot nth second invoke-command ] [ 3drop ] if ;
|
rot nth second
|
||||||
|
send-touchbar-command queue-gesture notify-ui-thread
|
||||||
|
yield
|
||||||
|
] [ 3drop ] if ;
|
||||||
|
|
||||||
<CLASS: FactorView < NSOpenGLView
|
<CLASS: FactorView < NSOpenGLView
|
||||||
COCOA-PROTOCOL: NSTextInput
|
COCOA-PROTOCOL: NSTextInput
|
||||||
|
|
Loading…
Reference in New Issue