From ccf28d54738fac3480b0e4574328ff3f5c65b378 Mon Sep 17 00:00:00 2001 From: slava Date: Tue, 21 Mar 2006 20:20:16 +0000 Subject: [PATCH] Fix free-fonts so it works independently of close-world --- library/ui/hand.factor | 7 ++----- library/ui/world.factor | 1 + 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/library/ui/hand.factor b/library/ui/hand.factor index 7487c63613..76648575f3 100644 --- a/library/ui/hand.factor +++ b/library/ui/hand.factor @@ -114,8 +114,5 @@ V{ } clone hand-buttons set-global [ drop ] [ deque dup layout repaint layout-queued ] if ; : close-world ( world -- ) - dup world-handle select-gl-context - f over request-focus* - dup remove-notify - dup free-fonts - f swap set-world-handle ; + f over request-focus* dup remove-notify + dup free-fonts f swap set-world-handle ; diff --git a/library/ui/world.factor b/library/ui/world.factor index 839ef6ad77..b3aec6f789 100644 --- a/library/ui/world.factor +++ b/library/ui/world.factor @@ -12,6 +12,7 @@ namespaces opengl sequences ; TUPLE: world glass status focus fonts handle ; : free-fonts ( world -- ) + dup world-handle select-gl-context world-fonts dup hash-values [ free-sprites ] each clear-hash ;