summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-12-12 13:08:13 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-12-12 13:08:13 (GMT)
commit45c895aa00461c2c9442642999da4cab04e1aad5 (patch)
tree78c9aa3cca9a5e8799b273f70d3eeece6fff7e48 /library
parentc51d6bc0892201d0a21d39fc41810fb04dfc8975 (diff)
downloadtk-45c895aa00461c2c9442642999da4cab04e1aad5.zip
tk-45c895aa00461c2c9442642999da4cab04e1aad5.tar.gz
tk-45c895aa00461c2c9442642999da4cab04e1aad5.tar.bz2
Merge 8.6
Diffstat (limited to 'library')
-rw-r--r--library/menu.tcl14
1 files changed, 6 insertions, 8 deletions
diff --git a/library/menu.tcl b/library/menu.tcl
index 446718f..3043147 100644
--- a/library/menu.tcl
+++ b/library/menu.tcl
@@ -825,7 +825,7 @@ proc ::tk::MenuNextEntry {menu count} {
if {$last < 0} {
return
}
- set length [expr {[$menu index last]+1}]
+ set length [expr {$last+1}]
set quitAfter $length
set active [$menu index active]
if {$active < 0} {
@@ -1336,14 +1336,12 @@ proc ::tk_menuSetFocus {menu} {
proc ::tk::GenerateMenuSelect {menu} {
variable ::tk::Priv
- if {$Priv(activeMenu) eq $menu \
- && $Priv(activeItem) eq [$menu index active]} {
- return
+ if {$Priv(activeMenu) ne $menu \
+ || $Priv(activeItem) ne [$menu index active]} {
+ set Priv(activeMenu) $menu
+ set Priv(activeItem) [$menu index active]
+ event generate $menu <<MenuSelect>>
}
-
- set Priv(activeMenu) $menu
- set Priv(activeItem) [$menu index active]
- event generate $menu <<MenuSelect>>
}
# ::tk_popup --