Use call( so that with-ui infers
parent
56ffaf5cb1
commit
36d03dfa08
|
@ -8,7 +8,7 @@ ui.backend ui.clipboards ui.gadgets ui.gadgets.worlds
|
|||
ui.backend.cocoa.views core-foundation core-foundation.run-loop
|
||||
core-graphics.types threads math.rectangles fry libc
|
||||
generalizations alien.c-types cocoa.views
|
||||
combinators io.thread locals ;
|
||||
combinators io.thread locals call ;
|
||||
IN: ui.backend.cocoa
|
||||
|
||||
TUPLE: handle ;
|
||||
|
@ -152,7 +152,7 @@ M: cocoa-ui-backend (with-ui)
|
|||
"UI" assert.app [
|
||||
[
|
||||
init-clipboard
|
||||
cocoa-init-hook get call
|
||||
cocoa-init-hook get call( -- )
|
||||
start-ui
|
||||
f io-thread-running? set-global
|
||||
init-thread-timer
|
||||
|
|
|
@ -153,7 +153,7 @@ PRIVATE>
|
|||
"UI update" spawn drop ;
|
||||
|
||||
: start-ui ( quot -- )
|
||||
call notify-ui-thread start-ui-thread ;
|
||||
call( -- ) notify-ui-thread start-ui-thread ;
|
||||
|
||||
: restore-windows ( -- )
|
||||
[
|
||||
|
@ -193,6 +193,6 @@ M: object close-window
|
|||
] "ui" add-init-hook
|
||||
|
||||
: with-ui ( quot -- )
|
||||
ui-running? [ call ] [ '[ init-ui @ ] (with-ui) ] if ;
|
||||
ui-running? [ call( -- ) ] [ '[ init-ui @ ] (with-ui) ] if ;
|
||||
|
||||
HOOK: beep ui-backend ( -- )
|
Loading…
Reference in New Issue