Fix UI bugs on X11

slava 2006-10-24 03:54:08 +00:00
parent 89a8856a8e
commit e86b6e1dda
4 changed files with 9 additions and 7 deletions

View File

@ -29,5 +29,4 @@ M: menu-glass layout* gadget-child prefer ;
} set-gestures
: show-menu ( gadget owner -- )
find-world [ <menu-glass> ] keep [ show-glass ] keep
t menu-mode? set-global ;
find-world [ <menu-glass> ] keep show-glass ;

View File

@ -40,7 +40,7 @@ C: presentation ( gadget object -- button )
[ <command-button> ] map-with
make-pile 1 over set-pack-fill ;
: operations-menu ( presentation -- gadget )
: operations-menu ( presentation -- )
dup presentation-object
dup object-operations <commands-menu>
swap show-menu ;
@ -58,7 +58,7 @@ presentation H{
] <filter> <label-control> dup reverse-video-theme ;
: <listener-button> ( gadget quot -- button )
[ call-listener ] curry <roll-button> ;
[ call-listener drop ] curry <roll-button> ;
! Character styles

View File

@ -168,8 +168,7 @@ SYMBOL: double-click-timeout
: update-clicked ( -- )
hand-gadget get-global hand-clicked set-global
hand-loc get-global hand-click-loc set-global
millis hand-last-time set-global ;
hand-loc get-global hand-click-loc set-global ;
: under-hand ( -- seq )
#! A sequence whose first element is the world and last is
@ -188,6 +187,7 @@ SYMBOL: double-click-timeout
dup button-down-#
dup update-click#
dup hand-last-button set-global
millis hand-last-time set-global
update-clicked
hand-buttons get-global push
button-gesture ;

View File

@ -75,6 +75,8 @@ M: world layout*
>r dup rect-dim r> set-layout-dim
] when* drop ;
M: world children-on nip gadget-children ;
: hide-glass ( world -- )
f menu-mode? set-global
dup world-glass [ unparent ] when*
@ -83,4 +85,5 @@ M: world layout*
: show-glass ( gadget world -- )
[ hide-glass ] keep
[ add-gadget ] 2keep
set-world-glass ;
set-world-glass
t menu-mode? set-global ;