summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--library/menu.tcl10
1 files changed, 9 insertions, 1 deletions
diff --git a/library/menu.tcl b/library/menu.tcl
index bd18600..ce483ca 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.3 1998/09/14 18:23:23 stanton Exp $
+# RCS: @(#) $Id: menu.tcl,v 1.4 1999/02/04 20:58:40 stanton Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -885,6 +885,10 @@ proc tkMenuFind {w char} {
set windowlist [winfo child $w]
foreach child $windowlist {
+ # Don't descend into other toplevels.
+ if {[winfo toplevel [focus]] != [winfo toplevel $child] } {
+ continue
+ }
switch [winfo class $child] {
Menu {
if {[$child cget -type] == "menubar"} {
@@ -911,6 +915,10 @@ proc tkMenuFind {w char} {
}
foreach child $windowlist {
+ # Don't descend into other toplevels.
+ if {[winfo toplevel [focus]] != [winfo toplevel $child] } {
+ continue
+ }
switch [winfo class $child] {
Menubutton {
set char2 [string index [$child cget -text] \