xpra icon
Bug tracker and wiki

Changes between Initial Version and Version 1 of Ticket #1461, comment 1


Ignore:
Timestamp:
03/09/17 14:50:12 (3 years ago)
Author:
Antoine Martin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1461, comment 1

    initial v1  
    2020Doing a quick test with google chrome, copying some text on a page (all pages including google docs seem to give the same results) and viewing the list of targets that chrome provides for the clipboard using our [/browser/xpra/trunk/src/xpra/gtk_common/gtk_view_clipboard.py view clipboard tool] we see: STRING, UTF8_STRING, TEXT, text/plain and text/html. (TIMESTAMP and SAVE_TARGETS can be ignored)
    2121
    22 So we should probably handle "text/html" and send more than one target - at the moment, we only send the first match (usually "UTF8_STRING").
     22So we should probably handle "text/html" server side and send more than one target - at the moment, we only send the first match (usually "UTF8_STRING").
    2323That's going to be difficult: we have to request each target, those requests are asynchronous and the token packet is only meant to carry one value at a time..
    2424On the plus side, this may help improve clipboard support for "greedy" platforms (win32 and osx).
     25
     26Copying from the OS to the browser, we currently only request "text/plain", but we should be able to handle more than that. Even image formats if we wanted.
     27The difficulty in this direction is that with asynchronous clipboards (X11), we can't set multiple values so we would need to set multiple targets and keep a cache of the value for each target - then reply with the correct cached value if and when the server-side application requests it. Messy.
    2528
    2629----