diff options
author | Norbert Preining <norbert@preining.info> | 2022-04-04 03:14:42 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-04-04 03:14:42 +0000 |
commit | 7548e4d37c2aaefd32fe0a9bcd83f8e71326dde1 (patch) | |
tree | d335b608e63e9b3c37d7ba0e567c63e77250e171 /systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/tearoff.tcl | |
parent | 506de1e2d3515161cdbc7018b4ccc9e49d7f86e8 (diff) |
CTAN sync 202204040314
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/tearoff.tcl')
-rw-r--r-- | systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/tearoff.tcl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/tearoff.tcl b/systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/tearoff.tcl index dece4dffc5..96e275f262 100644 --- a/systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/tearoff.tcl +++ b/systems/texlive/tlnet/tlpkg/tltcl/lib/tk8.6/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} { |