ui: the ui-thread variable isn't needed
parent
fe41e99437
commit
9e9b70005b
|
@ -132,8 +132,6 @@ M: world ungraft*
|
||||||
redraw-worlds
|
redraw-worlds
|
||||||
send-queued-gestures ;
|
send-queued-gestures ;
|
||||||
|
|
||||||
SYMBOL: ui-thread
|
|
||||||
|
|
||||||
: ui-running ( quot -- )
|
: ui-running ( quot -- )
|
||||||
t \ ui-running set-global
|
t \ ui-running set-global
|
||||||
[ f \ ui-running set-global ] [ ] cleanup ; inline
|
[ f \ ui-running set-global ] [ ] cleanup ; inline
|
||||||
|
@ -155,7 +153,7 @@ PRIVATE>
|
||||||
! run one iteration of update-ui. If that also fails, well, the
|
! run one iteration of update-ui. If that also fails, well, the
|
||||||
! whole UI subsystem is broken so we throw the error to terminate
|
! whole UI subsystem is broken so we throw the error to terminate
|
||||||
! the update-ui-loop.
|
! the update-ui-loop.
|
||||||
[ { [ ui-running? ] [ ui-thread get-global self eq? ] } 0&& ]
|
[ ui-running? ]
|
||||||
[
|
[
|
||||||
ui-notify-flag get lower-flag
|
ui-notify-flag get lower-flag
|
||||||
[ update-ui ] [
|
[ update-ui ] [
|
||||||
|
@ -166,8 +164,7 @@ PRIVATE>
|
||||||
] while ;
|
] while ;
|
||||||
|
|
||||||
: start-ui-thread ( -- )
|
: start-ui-thread ( -- )
|
||||||
[ self ui-thread set-global update-ui-loop ]
|
[ update-ui-loop ] "UI update" spawn drop ;
|
||||||
"UI update" spawn drop ;
|
|
||||||
|
|
||||||
: start-ui ( quot -- )
|
: start-ui ( quot -- )
|
||||||
call( -- ) notify-ui-thread start-ui-thread ;
|
call( -- ) notify-ui-thread start-ui-thread ;
|
||||||
|
|
Loading…
Reference in New Issue