ui.gadgets.worlds: don't need world with-variable.

with-gl-context already does world set-global.
factor-shell
John Benediktsson 2018-01-19 15:09:27 -08:00
parent 452fc6940a
commit 07e6e5e949
1 changed files with 7 additions and 10 deletions

View File

@ -104,8 +104,7 @@ TUPLE: world-attributes
ERROR: no-world-found ;
: find-gl-context ( gadget -- )
find-world dup
[ set-gl-context ] [ no-world-found ] if ;
find-world [ set-gl-context ] [ no-world-found ] if* ;
: (request-focus) ( child world ? -- )
pick parent>> pick eq? [
@ -216,14 +215,12 @@ ui-error-hook [ [ rethrow ] ] initialize
: draw-world ( world -- )
dup draw-world? [
dup world [
[
dup [ draw-world* ] with-gl-context
flush-layout-cache-hook get call( -- )
] [
swap f >>active? <world-error> throw
] recover
] with-variable
[
dup [ draw-world* ] with-gl-context
flush-layout-cache-hook get call( -- )
] [
swap f >>active? <world-error> throw
] recover
] [ drop ] if ;
world