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 taleinat
Recipients epaine, eryksun, taleinat, terry.reedy
Date 2021-05-16.12:57:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1621169826.02.0.801771045368.issue40452@roundup.psfhosted.org>
In-reply-to
Content
Okay, so it appears that a generic solution for tkinter is non-trivial, as it is not clear when to call Tcl_Finalize() or Tcl_FinalizeThread().

However, giving tkinter apps the ability to call those when appropriate is possible.  Exposing a thin wrapper around Tcl_Finalize in _tkinter, and making IDLE call that when exiting, resolves the clipboard preservation issue.

For some reason, calling Tcl_Finalize causes a memory segmentation issue for me on Ubuntu 20.04.  However, calling Tcl_FinalizeThread also resolves the clipboard issue without causing problems.  On Windows 10, calling either function works.
History
Date User Action Args
2021-05-16 12:57:06taleinatsetrecipients: + taleinat, terry.reedy, eryksun, epaine
2021-05-16 12:57:06taleinatsetmessageid: <1621169826.02.0.801771045368.issue40452@roundup.psfhosted.org>
2021-05-16 12:57:06taleinatlinkissue40452 messages
2021-05-16 12:57:05taleinatcreate