diff options
author | stanton <stanton@noemail.net> | 1999-02-04 20:58:39 (GMT) |
---|---|---|
committer | stanton <stanton@noemail.net> | 1999-02-04 20:58:39 (GMT) |
commit | c068c0345ec9a24471c5330d087790b89b3e82ac (patch) | |
tree | 9e6528dff43524263b36a3f4dbe6243a85863434 /library | |
parent | bd489ea171d72563074b3d282f7dfe239d005db9 (diff) | |
download | tk-c068c0345ec9a24471c5330d087790b89b3e82ac.zip tk-c068c0345ec9a24471c5330d087790b89b3e82ac.tar.gz tk-c068c0345ec9a24471c5330d087790b89b3e82ac.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]
FossilOrigin-Name: 2139a2d6922be7fccd8cd37f657d7efaa944aa9b
Diffstat (limited to 'library')
-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] \ |