| Ticket UUID: | 1596662 | |||
| Title: | Menu behaviour at screen bottom | |||
| Type: | Bug | Version: | 8.6.18, 9.0.5, 9.1b1 | |
| Submitter: | eserte | Created on: | 2006-11-14 22:59:29 | |
| Subsystem: | 10. Generic Menus | Assigned To: | aku | |
| Priority: | 5 Medium | Severity: | Minor | |
| Status: | Closed | Last Modified: | 2026-09-30 20:33:34 | |
| Resolution: | Fixed | Closed By: | nemethi | |
| Closed on: | 2026-09-30 20:33:34 | |||
| Description: |
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
| |||
| User Comments: |
nemethi (claiming to be Csaba Nemethi) added on 2026-09-30 20:33:34:
Serhiy, many thanks! The fix is now in main, core-9-0-branch, and core-8-6-branch; see commits [0f866663], [5c47ae3e], and [3aacabb1]. serhiy.storchaka added on 2026-09-30 08:46:22: Duplicate of [470331]. Proposed fix in branch menu-post-under-pointer: as suggested here and as other toolkits do, a menu which does not fit below the menubar is posted above it. A menu which still covers the pointer does not invoke an entry on the release of the click which posted it. See [470331] for details. eserte added on 2006-11-15 05:59:29: File Added - 202840: menuhack.pl | |||
Attachments:
- menuhack.pl [download] added by eserte on 2006-11-15 05:59:29. [details]
