summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authortmh <tmh>2005-05-27 18:00:57 (GMT)
committertmh <tmh>2005-05-27 18:00:57 (GMT)
commitfc6c7372de6ac4bf4e5cda274c8d1b211f14a8bb (patch)
tree83a037587926fa01503bd86948eeec0113e1830b /library
parent977f577b341fb9cd0aab1d1e446b848f0b7af5e9 (diff)
downloadtk-fc6c7372de6ac4bf4e5cda274c8d1b211f14a8bb.zip
tk-fc6c7372de6ac4bf4e5cda274c8d1b211f14a8bb.tar.gz
tk-fc6c7372de6ac4bf4e5cda274c8d1b211f14a8bb.tar.bz2
change tk_popup to have sticky menus
Diffstat (limited to 'library')
-rw-r--r--library/menu.tcl7
1 files changed, 5 insertions, 2 deletions
diff --git a/library/menu.tcl b/library/menu.tcl
index c6d65bf..5a59c87 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.18.2.1 2004/02/04 00:23:04 hobbs Exp $
+# RCS: @(#) $Id: menu.tcl,v 1.18.2.2 2005/05/27 18:00:59 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]
}
}