Ned Deily added the comment: As far as I can tell, the problem you are seeing with the menu not disappearing when iconifying is caused by the use of grab_release() in do_popup(). If I remove it, using an X11-based Tk 8.6, the focus stays on the menu and clicking on the iconify button causes the menu to be dismissed. With grab_release(), the focus is released from the menu and clicking on the iconify button causes the menu to stay. Unfortunately, there are differences among the various Tk releases and, with the same release, among platform implementations (Windows Tk, X11 Tk, OS X Cocoa Tk, etc). Another issue was the use of the 0 "entry" argument on the call on tk_popup call. With the X11 Tk I tested with, that caused the menu to flash and disappear when clicking the window; removing the 0 argument caused the menu to stay as expected. With an OS X Cocoa Tk, your original test case worked fine without modification. A good modern resource for using Tk is the TkDocs website, which covers use of Tk from Tcl, Python, Ruby, and Perl. The menus sections describes some of the platform differences you may encounter and need to deal with:
http://www.tkdocs.com/tutorial/menus.html ---------- nosy: +ned.deily resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13985> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com