]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/ui/gadgets/worlds/worlds.factor
Fixing basis -> extra dependencies
[factor.git] / basis / ui / gadgets / worlds / worlds.factor
index bf4c275dc2512208b0ad30ef2b006dc18604ae6d..cedd03e39e256d731edca728592c5209c8619e1d 100755 (executable)
@@ -22,6 +22,12 @@ window-loc ;
 
 : hide-status ( gadget -- ) f swap show-status ;
 
+ERROR: no-world-found ;
+
+: find-gl-context ( gadget -- )
+    find-world dup
+    [ handle>> select-gl-context ] [ no-world-found ] if ;
+
 : (request-focus) ( child world ? -- )
     pick parent>> pick eq? [
         >r >r dup parent>> dup r> r>