ui.gadgets.worlds: don't need world with-variable.
with-gl-context already does world set-global.factor-shell
parent
452fc6940a
commit
07e6e5e949
|
@ -104,8 +104,7 @@ TUPLE: world-attributes
|
||||||
ERROR: no-world-found ;
|
ERROR: no-world-found ;
|
||||||
|
|
||||||
: find-gl-context ( gadget -- )
|
: find-gl-context ( gadget -- )
|
||||||
find-world dup
|
find-world [ set-gl-context ] [ no-world-found ] if* ;
|
||||||
[ set-gl-context ] [ no-world-found ] if ;
|
|
||||||
|
|
||||||
: (request-focus) ( child world ? -- )
|
: (request-focus) ( child world ? -- )
|
||||||
pick parent>> pick eq? [
|
pick parent>> pick eq? [
|
||||||
|
@ -216,14 +215,12 @@ ui-error-hook [ [ rethrow ] ] initialize
|
||||||
|
|
||||||
: draw-world ( world -- )
|
: draw-world ( world -- )
|
||||||
dup draw-world? [
|
dup draw-world? [
|
||||||
dup world [
|
[
|
||||||
[
|
dup [ draw-world* ] with-gl-context
|
||||||
dup [ draw-world* ] with-gl-context
|
flush-layout-cache-hook get call( -- )
|
||||||
flush-layout-cache-hook get call( -- )
|
] [
|
||||||
] [
|
swap f >>active? <world-error> throw
|
||||||
swap f >>active? <world-error> throw
|
] recover
|
||||||
] recover
|
|
||||||
] with-variable
|
|
||||||
] [ drop ] if ;
|
] [ drop ] if ;
|
||||||
|
|
||||||
world
|
world
|
||||||
|
|
Loading…
Reference in New Issue