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
|
||||
|
||||
M: popup hide-glass-hook
|
||||
owner>> f >>popup request-focus ;
|
||||
dup owner>> 2dup popup>> eq?
|
||||
[ f >>popup request-focus drop ] [ 2drop ] if ;
|
||||
|
||||
PRIVATE>
|
||||
|
||||
|
@ -75,7 +76,5 @@ popup H{
|
|||
popup>> focusable-child resend-gesture ;
|
||||
|
||||
: show-popup ( owner popup visible-rect -- )
|
||||
[ <popup> ] dip
|
||||
[ drop dup owner>> (>>popup) ]
|
||||
[ [ [ owner>> ] keep ] dip show-glass ]
|
||||
2bi ;
|
||||
[ [ dup dup popup>> [ hide-glass ] when* ] dip <popup> ] dip
|
||||
[ drop >>popup drop ] [ show-glass ] 3bi ;
|
Loading…
Reference in New Issue