         2drop { 0 0 }
     ] [
         over rect-loc >r
-        >r gadget-parent r> relative-loc
+        >r parent>> r> relative-loc
         r> v+
     ] if ;
 

    parents { 0 0 } [ rect-loc v+ ] reduce ;

: (screen-rect) ( gadget -- loc ext )
    dup gadget-parent [
        >r rect-extent r> (screen-rect)
        >r tuck v+ r> vmin >r v+ r>
    ] [


: (add-gadget) ( gadget box -- )
    over unparent
    dup pick (>>parent)
    [ ((add-gadget)) ] 2keep
    gadget-graft-state second [ graft ] [ drop ] if ;

