[issue40452] Tkinter/IDLE: preserve clipboard on closure
Tal Einat
report at bugs.python.org
Sun May 16 08:57:06 EDT 2021
Tal Einat <taleinat+python at gmail.com> added the comment:
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.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40452>
_______________________________________
More information about the Python-bugs-list
mailing list