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 } set-gestures
: show-menu ( gadget owner -- ) : show-menu ( gadget owner -- )
find-world [ <menu-glass> ] keep [ show-glass ] keep find-world [ <menu-glass> ] keep show-glass ;
t menu-mode? set-global ;

View File

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

View File

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

View File

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