diff --git a/basis/ui/gadgets/worlds/worlds.factor b/basis/ui/gadgets/worlds/worlds.factor index c66e59b292..885f4138ff 100644 --- a/basis/ui/gadgets/worlds/worlds.factor +++ b/basis/ui/gadgets/worlds/worlds.factor @@ -152,10 +152,15 @@ M: world handle-gesture ( gesture gadget -- ? ) GENERIC: world-pixel-format-attributes ( world -- attributes ) +GENERIC# check-world-pixel-format 1 ( world pixel-format -- ) + M: world world-pixel-format-attributes drop { windowed double-buffered T{ depth-bits { value 16 } } } ; +M: world check-world-pixel-format + 2drop ; + : with-world-pixel-format ( world quot -- ) [ dup dup world-pixel-format-attributes ] - dip with-disposal ; inline + dip [ 2dup check-world-pixel-format ] prepose with-disposal ; inline