This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ned.deily
Recipients BreamoreBoy, marc.dechico, ned.deily
Date 2014-07-03.08:05:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1404374725.05.0.184019569592.issue13985@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2014-07-03 08:05:25ned.deilysetrecipients: + ned.deily, BreamoreBoy, marc.dechico
2014-07-03 08:05:25ned.deilysetmessageid: <1404374725.05.0.184019569592.issue13985@psf.upfronthosting.co.za>
2014-07-03 08:05:25ned.deilylinkissue13985 messages
2014-07-03 08:05:23ned.deilycreate