From a60bf8065a25979f32eae95569ace14e44f57d6d Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 13 Jan 2009 20:44:36 -0600 Subject: [PATCH] Add hide-glass-hook --- basis/ui/gadgets/glass/glass.factor | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/basis/ui/gadgets/glass/glass.factor b/basis/ui/gadgets/glass/glass.factor index fa3d1da9fd..17b3478391 100644 --- a/basis/ui/gadgets/glass/glass.factor +++ b/basis/ui/gadgets/glass/glass.factor @@ -4,6 +4,10 @@ USING: accessors kernel namespaces ui.gadgets ui.gadgets.worlds ui.gestures ; IN: ui.gadgets.glass +GENERIC: hide-glass-hook ( gadget -- ) + +M: gadget hide-glass-hook drop ; + TUPLE: glass < gadget ; : ( child loc -- glass ) @@ -11,6 +15,8 @@ TUPLE: glass < gadget ; M: glass layout* gadget-child prefer ; +M: glass ungraft* gadget-child hide-glass-hook ; + : hide-glass ( world -- ) [ [ unparent ] when* f ] change-glass drop ;