From e87f05363c3edffd3b8af20024c08b64ec23f978 Mon Sep 17 00:00:00 2001 From: jingham Date: Wed, 19 Apr 2000 00:08:14 +0000 Subject: [PATCH] 2000-04-18 James Ingham * library/toolbar.tcl (TOOLBAR_button_up): If the pointer is still in the button, reraise the button after a press. --- libgui/ChangeLog | 10 ++++++++++ libgui/library/toolbar.tcl | 30 +++++++++++++++++++----------- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/libgui/ChangeLog b/libgui/ChangeLog index 2a16f91ba4..4f270f6a74 100644 --- a/libgui/ChangeLog +++ b/libgui/ChangeLog @@ -1,3 +1,13 @@ +2000-04-18 James Ingham + + * library/toolbar.tcl (TOOLBAR_button_up): If the pointer is still + in the button, reraise the button after a press. + +2000-04-03 James Ingham + + * src/paths.c: Follow links in determining the location of the + executable. + Fri Sep 17 19:14:15 1999 Andrew Cagney * src/guitcl.h (cyg_create_warp_pointer_command): Add declaration. diff --git a/libgui/library/toolbar.tcl b/libgui/library/toolbar.tcl index daa49d6bc7..12a67e85e1 100644 --- a/libgui/library/toolbar.tcl +++ b/libgui/library/toolbar.tcl @@ -71,25 +71,33 @@ proc TOOLBAR_button_up {w} { set TOOLBAR_state(button) "" #restore original relief - $w configure -relief $TOOLBAR_state(relief) + $w configure -relief $TOOLBAR_state(relief) if {$TOOLBAR_state(window) == $w && [$w cget -state] != "disabled"} then { - -#SN does the toolbar bindings using "+" so that older -#bindings don't disapear. So no need to invoke the command. -#other applications should do the same so that we can delete -#this hack -global sn_options -if {! [array exists sn_options]} { - #invoke the binding - uplevel \#0 [list $w invoke] -} + + #SN does the toolbar bindings using "+" so that older + #bindings don't disapear. So no need to invoke the command. + #other applications should do the same so that we can delete + #this hack + global sn_options + if {! [array exists sn_options]} { + #invoke the binding + uplevel \#0 [list $w invoke] + } if {[winfo exists $w]} then { if {[$w cget -state] != "disabled"} then { $w configure -state normal } } + # HOWEVER, if the pointer is still over the button, and it + # is enabled, then raise it again. + + if {[string compare [winfo containing \ + [winfo pointerx $w] \ + [winfo pointery $w]] $w] == 0} { + $w configure -relief raised + } } } } -- 2.11.0