From 88ca7abd5480a8f9dda8c8a2dade81737bb39949 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sat, 17 Jul 2010 16:08:36 -0400 Subject: [PATCH] ui.gadgets.worlds: dispose of the handle after ungrabbing input --- basis/ui/gadgets/worlds/worlds.factor | 11 ++++------- basis/ui/ui.factor | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/basis/ui/gadgets/worlds/worlds.factor b/basis/ui/gadgets/worlds/worlds.factor index e713b0f999..7e064ee76b 100644 --- a/basis/ui/gadgets/worlds/worlds.factor +++ b/basis/ui/gadgets/worlds/worlds.factor @@ -129,6 +129,7 @@ M: world request-focus-on ( child gadget -- ) [ T{ rgba f 1.0 1.0 1.0 1.0 } ] if ; GENERIC# apply-world-attributes 1 ( world attributes -- world ) + M: world apply-world-attributes { [ title>> >>title ] @@ -166,15 +167,11 @@ flush-layout-cache-hook [ [ ] ] initialize GENERIC: begin-world ( world -- ) GENERIC: end-world ( world -- ) - GENERIC: resize-world ( world -- ) -M: world begin-world - drop ; -M: world end-world - drop ; -M: world resize-world - drop ; +M: world begin-world drop ; +M: world end-world drop ; +M: world resize-world drop ; M: world dim<< [ call-next-method ] diff --git a/basis/ui/ui.factor b/basis/ui/ui.factor index d65f4725a9..fad774cbcc 100644 --- a/basis/ui/ui.factor +++ b/basis/ui/ui.factor @@ -90,8 +90,8 @@ M: world ungraft* [ hand-gadget close-global ] [ end-world ] [ [ [ [ dispose ] when* ] each V{ } clone ] change-window-resources drop ] - [ [ (close-window) f ] change-handle drop ] [ unfocus-world ] + [ [ (close-window) f ] change-handle drop ] [ promise>> t swap fulfill ] } cleave ;