Xpra: Ticket #313: speed up clipboard paste for "greedy" clients (win32)

Not sure if this would work or not, OTOH why not?
When we paste something coming from the server into a win32 application, we ask for the clipboard contents everytime the client application requests the data (for every paste).
Because this ends up doing a round-trip to the server, this can be quite slow. For example: try copying something in the server, then holding "Ctrl+V" in notepad on win32.
Because win32 clients are "greedy" / buggy, we are already notified by the server whenever the contents change so we should be able to cache the value after each request (per TARGET: UTF8_STRING="somestring", STRING="..") and skip the roundtrip for subsequent requests.
Furthermore, if this works well enough, we may want to make all clients greedy to speed things up? (or maybe just for "CLIPBOARD" as "PRIMARY" changes way too often - beware of clipboard managers problems though)

Another thing we may be able to do for greedy clients is to always send the list of targets with the clipboard token, saving another round trip as the client requests the targets pretty much every time (IIRC).

Thu, 18 Apr 2013 15:26:28 GMT - Antoine Martin: owner, status, description, summary changed

Thu, 11 Jul 2013 16:53:13 GMT - Antoine Martin: status changed; resolution set

Clipboard is tricky enough as it is!

Sat, 23 Jan 2021 04:51:25 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/313