Tk Source Code

View Ticket
Login
Ticket UUID: 939389
Title: Win Tk can lose clipboard data on exit (bug fix)
Type: Patch Version: None
Submitter: yamako Created on: 2004-04-21 16:01:01
Subsystem: 52. [clipboard] Assigned To: hobbs
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2004-05-04 05:20:07
Resolution: Fixed Closed By: hobbs
    Closed on: 2004-05-03 22:20:07
Description:
When wish84.exe runs the following script saved as 
"a.tcl", the clipboard on Windows system doesn't 
have the text "foo":

# run as "wish84.exe a.tcl"
clipboard append foo
exit

TkpCloseDisplay() function (win/tkWinX.c) tries to 
render the clipboard data before exiting wish84.exe 
if dispPtr->clipWindow is not NULL. But, 
TkCloseDisplay() function (generic/tkWindow.c) 
calls TkClipCleanup() function before calling 
TkpCloseDisplay() function so that dispPtr->clipWindow 
in TkpCloseDisplay() is always NULL.
TkWinClipboardRender() function (win/tkWinClipboard.c) 
is only called when WM_RENDERFORMAT message is sent.
User Comments: hobbs added on 2004-05-04 05:20:07:
Logged In: YES 
user_id=72656

fixed in core-8-4-branch and 8.5-head 2004-05-03.  The
solution was to extend TkClipCleanup and make it platform
specific instead.

yamako added on 2004-04-21 23:01:06:

File Added - 84533: clipboardPatch.txt

Attachments: