update-hand fix for hang with track gadget

slava 2006-05-31 20:30:30 +00:00
parent ece98fdad6
commit 0933402e5b
1 changed files with 11 additions and 6 deletions

View File

@ -24,12 +24,14 @@ SYMBOL: windows
windows get-global [ second eq? ] find-with drop windows get-global [ second eq? ] find-with drop
windows get-global [ length 1- ] keep exchange ; windows get-global [ length 1- ] keep exchange ;
: update-hand ( world -- ) : update-hand ( gadget -- )
dup hand-gadget get-global find-world eq? find-world [
[ hand-loc get-global swap move-hand ] [ drop ] if ; dup hand-gadget get-global find-world eq?
[ hand-loc get-global swap move-hand ] [ drop ] if
] when* ;
: post-layout ( gadget -- ) : post-layout ( gadget -- )
find-world [ dup update-hand dup world-handle set ] when* ; find-world [ dup world-handle set ] when* ;
: layout-queued ( -- ) : layout-queued ( -- )
invalid dup queue-empty? [ invalid dup queue-empty? [
@ -44,8 +46,11 @@ SYMBOL: windows
: ui-step ( -- ) : ui-step ( -- )
do-timers do-timers
[ layout-queued ] make-hash hash-values [ layout-queued ] make-hash hash-values [
[ dup world-handle [ draw-world ] [ drop ] if ] each dup update-hand
dup world-handle [ dup draw-world ] when
drop
] each
10 sleep ; 10 sleep ;
: <status-bar> ( -- gadget ) "" <label> dup highlight-theme ; : <status-bar> ( -- gadget ) "" <label> dup highlight-theme ;