Author: George Petasis <petasis@iit.demokritos.gr>
State: Draft
Type: Project
Tcl-Version: 8.7
Vote: Pending
Created: 04-Aug-2010
Post-History:
Abstract
This TIP proposes the addition of a new argument to the Tk command selection, for specifying a timestamp that should be used in order to retrieve a selection.
Rationale
TkDND 2.x always used the selection command to retrieve data from the clipboard, and worked until recently. The problem seems to be that the selection Tk command always uses "CurrentTime" while retrieving the selection, while the XDND protocol specifies that a specific timestamp should be used.
I see that in Tk sources (unix/tkUnixSelect.c, line 178, the call to XConvertSelection) there is already some discussion in the comments which timestamp should be used. The "CurrentTime" seems a good choice, but why not offer the ability to provide a timestamp if needed?
Proposed Change
Add a new option to selection get. Something like this:
selection get ?-displayof window? ?-selection selection? ?-type type? ?-time time?
The time value will be an integer, the same as in the -time option to event generate and as produced by the %t substitution in bind.
Copyright
This document has been placed in the public domain.