Artifact
39167121e25a66e9d499b120f1719b36d568372f23651cd40b996494af1c2e4f:
Attachment "tkMenu.diff" to
ticket [d8f9640f]
added by
emiliano
2026-01-12 14:59:44.
Index: generic/tkMenu.c
==================================================================
--- generic/tkMenu.c
+++ generic/tkMenu.c
@@ -1634,11 +1634,12 @@
*/
while (1) {
Tk_Window parent = Tk_Parent(tkwin);
- if (Tk_Class(parent) != Tk_Class(menuPtr->tkwin)) {
+ if ((Tk_Class(parent) != Tk_Class(menuPtr->tkwin)) ||
+ Tk_IsTopLevel(parent)) {
break;
}
tkwin = parent;
}
if (((TkMenu *) tkwin)->menuType == MENUBAR) {