
A selection owner is supposed to respond to a request for the selection target TIMESTAMP by providing the X server time at which the selection was written. There was a /* TODO */ comment in xf_cliprdr where the code to do that should have been. The absence of this can cause a problem when pasting into some X clients. xtightvncviewer, in particular, will give up the attempt to read from the clipboard at all if it doesn't get a satisfactory response to the initial TIMESTAMP request - and the non-answer zero value "CurrentTime" counts as unsatisfactory. It won't be happy with anything short of a real X server time value. (Checking the VNC source code, that's because it reads both PRIMARY and CLIPBOARD and picks the one with the later timestamp. So it does depend on the timestamps existing.) When you're writing to the selection in response to a normal X event like a mouse click or keyboard action, you get the selection timestamp by copying the time field out of that X event. Here, we're doing it on our own initiative, so we have to _request_ the X server time. There isn't a GetServerTime request in the X protocol, so I work around it by setting a property on our own window, and waiting for a PropertyNotify event to come back telling me it's been done - which will have a timestamp we can use.
FreeRDP: A Remote Desktop Protocol Implementation
FreeRDP is a free implementation of the Remote Desktop Protocol (RDP), released under the Apache license. Enjoy the freedom of using your software wherever you want, the way you want it, in a world where interoperability can finally liberate your computing experience.
Resources
Project website: https://www.freerdp.com/
Issue tracker: https://github.com/FreeRDP/FreeRDP/issues
Sources: https://github.com/FreeRDP/FreeRDP/
Downloads: https://pub.freerdp.com/releases/
Wiki: https://github.com/FreeRDP/FreeRDP/wiki
API documentation: https://pub.freerdp.com/api/
IRC channel: #freerdp @ irc.freenode.net
Mailing list: https://lists.sourceforge.net/lists/listinfo/freerdp-devel
Microsoft Open Specifications
Information regarding the Microsoft Open Specifications can be found at: http://www.microsoft.com/openspecifications/
A list of reference documentation is maintained here: https://github.com/FreeRDP/FreeRDP/wiki/Reference-Documentation
Compilation
Instructions on how to get started compiling FreeRDP can be found on the wiki: https://github.com/FreeRDP/FreeRDP/wiki/Compilation