If a Tk toplevel is moved near the bottom of the screen and a menu item is selected from the menubar with a short mouse click, and if the menu pops up under the pointer, then a menu item is accidentaly selected. This can be easily reproduced by any Tk script using menus, e.g. the widget demonstration: open the "Menus and cascades" demonstration, move the created window near to the screen bottom, and click on any of the menus.
Other toolkits (i.e. Gtk) seem to solve this problem by popping the menu *above* the pointer in these situations.
Attached is a naive Perl/Tk hack around Tk::Menu::post to implement just this behaviour. It would be nice if tkMenuDraw.c:TkPostSubmenu had something similar.
Regards,
Slaven
Perl/Tk hack to change Menu post behaviour