From 35e5c572ce291dd0bc94d715b50d36edbad8a4a5 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sat, 17 Jul 2010 16:09:25 -0400 Subject: [PATCH] ui: cleanup --- basis/ui/ui.factor | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/basis/ui/ui.factor b/basis/ui/ui.factor index fad774cbcc..68bb064328 100644 --- a/basis/ui/ui.factor +++ b/basis/ui/ui.factor @@ -81,6 +81,9 @@ M: world graft* [ [ clean-up-broken-window ] [ ui-error ] bi* ] recover ] bi ; +: dispose-window-resources ( world -- ) + [ [ [ dispose ] when* ] each V{ } clone ] change-window-resources drop ; + M: world ungraft* { [ set-gl-context ] @@ -89,7 +92,7 @@ M: world ungraft* [ hand-clicked close-global ] [ hand-gadget close-global ] [ end-world ] - [ [ [ [ dispose ] when* ] each V{ } clone ] change-window-resources drop ] + [ dispose-window-resources ] [ unfocus-world ] [ [ (close-window) f ] change-handle drop ] [ promise>> t swap fulfill ]