diff options
author | stanton <stanton> | 1999-02-04 20:58:40 (GMT) |
---|---|---|
committer | stanton <stanton> | 1999-02-04 20:58:40 (GMT) |
commit | f24f33c90542b7651835ef2883cd302389178d0d (patch) | |
tree | 9e6528dff43524263b36a3f4dbe6243a85863434 /library/menu.tcl | |
parent | 955ce6fbcdcca30ded10dd5bdef28603b431da7f (diff) | |
download | tk-f24f33c90542b7651835ef2883cd302389178d0d.zip tk-f24f33c90542b7651835ef2883cd302389178d0d.tar.gz tk-f24f33c90542b7651835ef2883cd302389178d0d.tar.bz2 |
* library/menu.tcl (tkMenuFind): Changed so keyboard shortcuts
will only be found in the current toplevel. Previously, they
might be found in menus attached to other toplevels that might not
even be mapped. [Bug: 924]
Diffstat (limited to 'library/menu.tcl')
-rw-r--r-- | library/menu.tcl | 10 |
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] \ |