Opening a second popup if one is already visible hides the first
parent
06f29ab7e4
commit
da254e4621
|
@ -63,7 +63,8 @@ TUPLE: popup < wrapper owner ;
|
||||||
swap >>owner ; inline
|
swap >>owner ; inline
|
||||||
|
|
||||||
M: popup hide-glass-hook
|
M: popup hide-glass-hook
|
||||||
owner>> f >>popup request-focus ;
|
dup owner>> 2dup popup>> eq?
|
||||||
|
[ f >>popup request-focus drop ] [ 2drop ] if ;
|
||||||
|
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
||||||
|
@ -75,7 +76,5 @@ popup H{
|
||||||
popup>> focusable-child resend-gesture ;
|
popup>> focusable-child resend-gesture ;
|
||||||
|
|
||||||
: show-popup ( owner popup visible-rect -- )
|
: show-popup ( owner popup visible-rect -- )
|
||||||
[ <popup> ] dip
|
[ [ dup dup popup>> [ hide-glass ] when* ] dip <popup> ] dip
|
||||||
[ drop dup owner>> (>>popup) ]
|
[ drop >>popup drop ] [ show-glass ] 3bi ;
|
||||||
[ [ [ owner>> ] keep ] dip show-glass ]
|
|
||||||
2bi ;
|
|
Loading…
Reference in New Issue