diff options
author | fvogel <fvogelnew1@free.fr> | 2021-11-16 20:39:47 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2021-11-16 20:39:47 (GMT) |
commit | d8f50ac067d2f0df387ca0b0c46278c2464efc8b (patch) | |
tree | 4c40167ca8b673d38459b4478944b8bc60cc4a7f /library/tearoff.tcl | |
parent | c56ea97892bf4b5716fd0c88709b0ef0cb130995 (diff) | |
parent | a9827f93eadc2978316098553e09406dae1f5520 (diff) | |
download | tk-bug-b1d115fa60.zip tk-bug-b1d115fa60.tar.gz tk-bug-b1d115fa60.tar.bz2 |
Merge 8.6bug-b1d115fa60
Diffstat (limited to 'library/tearoff.tcl')
-rw-r--r-- | library/tearoff.tcl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/library/tearoff.tcl b/library/tearoff.tcl index dece4df..96e275f 100644 --- a/library/tearoff.tcl +++ b/library/tearoff.tcl @@ -79,11 +79,11 @@ proc ::tk::TearOffMenu {w {x 0} {y 0}} { } if {[tk windowingsystem] eq "win32"} { - # [Bug 3181181]: Find the toplevel window for the menu - set parent [winfo toplevel $parent] - while {[winfo class $parent] eq "Menu"} { - set parent [winfo toplevel [winfo parent $parent]] - } + # [Bug 3181181]: Find the toplevel window for the menu + set parent [winfo toplevel $parent] + while {[winfo class $parent] eq "Menu"} { + set parent [winfo toplevel [winfo parent $parent]] + } wm transient $menu [winfo toplevel $parent] wm attributes $menu -toolwindow 1 } @@ -135,7 +135,7 @@ proc ::tk::MenuDup {src dst type} { } eval $cmd set last [$src index last] - if {$last eq "none"} { + if {$last eq "none" || $last < 0} { return } for {set i [$src cget -tearoff]} {$i <= $last} {incr i} { |