Hey, On Thu, Aug 18, 2016 at 10:49:51PM +0300, Alex Roithman wrote: > Documentation is still not clear. It is impossible to understand how to > call the guest request to get the data selection from client clipboard. > > About: spice-client-glib, 'main-clipboard-selection-request' signal. In > which cases this signal can be emitted?.. > How to use the spice-client-glib for guest to client copy/paste? Looking a bit at spice-gtk code, it seems what you are trying to achieve (copy from client to guest) is done through spice_gtk_session_copy_to_guest(). First it calls gtk_clipboard_request_targets() to get the list of targets supported by the current clipboard, and then passes these targets to spice_main_clipboard_selection_grab() after some marshalling of the list. spice_main_clipboard_selection_grab() is going to send data to the agent. Then spice-gtk will receive a VD_AGENT_CLIPBOARD_REQUEST from the agent, which will cause the "main-clipboard-selection-request" signal to be emitted. clipboard_request() in spice-gtk will then call gtk_clipboard_request_contents() to get the client clipboard content, and will then call spice_main_clipboard_selection_notify() in order to send it. keep in mind that parts of this may be inaccurate/wrong, as I'm not fully familiar with that clipboard code. Hope that helps, Christophe
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel