diff options
author | tmh <tmh@noemail.net> | 2005-05-27 18:06:25 (GMT) |
---|---|---|
committer | tmh <tmh@noemail.net> | 2005-05-27 18:06:25 (GMT) |
commit | 81cd3ea4618570af1b9e330e5467e2dbdc8139c3 (patch) | |
tree | a0841221f74690762d19c38c2b5e436e13e6d40f /library | |
parent | 47031008a0ccc49d154d7387750f1f0e3bc36774 (diff) | |
download | tk-81cd3ea4618570af1b9e330e5467e2dbdc8139c3.zip tk-81cd3ea4618570af1b9e330e5467e2dbdc8139c3.tar.gz tk-81cd3ea4618570af1b9e330e5467e2dbdc8139c3.tar.bz2 |
change tk_popup to have sticky menus
FossilOrigin-Name: 43d515082482ed46ed6b97a5c62ca5118bd326db
Diffstat (limited to 'library')
-rw-r--r-- | library/menu.tcl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/library/menu.tcl b/library/menu.tcl index 41c51fd..e8e2f7c 100644 --- a/library/menu.tcl +++ b/library/menu.tcl @@ -4,7 +4,7 @@ # It also implements keyboard traversal of menus and implements a few # other utility procedures related to menus. # -# RCS: @(#) $Id: menu.tcl,v 1.20 2004/02/04 00:25:13 hobbs Exp $ +# RCS: @(#) $Id: menu.tcl,v 1.21 2005/05/27 18:06:26 tmh Exp $ # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. @@ -687,7 +687,10 @@ proc ::tk::MenuInvoke {w buttonRelease} { uplevel #0 [list $w invoke $active] } } else { - MenuUnpost $w + set active [$w index active] + if {$Priv(popup) eq "" || $active ne "none"} { + MenuUnpost $w + } uplevel #0 [list $w invoke active] } } |