]> gitweb.factorcode.org Git - factor.git/commitdiff
ui: the ui-thread variable isn't needed
authorBjörn Lindqvist <bjourne@gmail.com>
Tue, 27 Jun 2017 21:15:41 +0000 (23:15 +0200)
committerBjörn Lindqvist <bjourne@gmail.com>
Tue, 27 Jun 2017 21:47:35 +0000 (23:47 +0200)
basis/ui/ui.factor

index f74f96c5e855067cab3b224a1692646fcd703841..7788c67e13b48dd3a134dd05ad3d3a9eb2ea2d6c 100644 (file)
@@ -132,8 +132,6 @@ M: world ungraft*
     redraw-worlds
     send-queued-gestures ;
 
-SYMBOL: ui-thread
-
 : ui-running ( quot -- )
     t \ ui-running set-global
     [ f \ ui-running set-global ] [ ] cleanup ; inline
@@ -155,7 +153,7 @@ PRIVATE>
     ! run one iteration of update-ui. If that also fails, well, the
     ! whole UI subsystem is broken so we throw the error to terminate
     ! the update-ui-loop.
-    [ { [ ui-running? ] [ ui-thread get-global self eq? ] } 0&& ]
+    [ ui-running? ]
     [
         ui-notify-flag get lower-flag
         [ update-ui ] [
@@ -166,8 +164,7 @@ PRIVATE>
     ] while ;
 
 : start-ui-thread ( -- )
-    [ self ui-thread set-global update-ui-loop ]
-    "UI update" spawn drop ;
+    [ update-ui-loop ] "UI update" spawn drop ;
 
 : start-ui ( quot -- )
     call( -- ) notify-ui-thread start-ui-thread ;