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