<div dir="ltr"><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Alex Roithman</b> <span dir="ltr"><<a href="mailto:kaperang07@gmail.com">kaperang07@gmail.com</a>></span><br>Date: 13 May 2016 at 22:13<br>Subject: Re: [Spice-devel] paste client clipboard selection to guest<br>To: Christophe Fergeau <<a href="mailto:cfergeau@redhat.com">cfergeau@redhat.com</a>><br><br><br><div dir="ltr"><div><div><div>Yes, in remote-viewer and virt-manager copy/paste works.<br><br></div>I try to implement spice viewer using spice-client-glib-2.0.<br></div>Video, sound, send files, copy selections from guest to host -- works.<br>One problem: paste from host clipboard to guest.<br></div><div>It is a code place: <a href="https://github.com/F1ash/qt-virt-manager/blob/master/src/vm_viewer/qspice_widgets/qspice-main-channel.cpp#L306" target="_blank">.../vm_viewer/qspice_widgets/qspice-main-channel.cpp#L306 .</a><br></div><div><br></div><div>How i implement it:<br></div><div>just read data from QClipboard, then set appropriate data type<br>and call <span>spice_main_clipboard_selection_notify</span><span>(...)</span><span> with this data<br>by </span><span>clipboardSelectionNotify() method. <br></span></div><div><span>I check when the guest clipboard was released, but not works too.<br></span></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 13 May 2016 at 18:54, Christophe Fergeau <span dir="ltr"><<a href="mailto:cfergeau@redhat.com" target="_blank">cfergeau@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey,<br>
<span><br>
On Mon, Apr 18, 2016 at 06:26:29AM +0300, Alex Roithman wrote:<br>
> I can't implement paste data to the guest.<br>
><br>
> spice_main_clipboard_selection_notify()<br>
> don't send data to guest even if implement<br>
> as:<br>
><br>
>     spice_main_clipboard_selection_notify(<br>
>                 (SpiceMainChannel *) gobject,<br>
>                 VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD,<br>
>                 type,<br>
>                 (const guchar*)"153",<br>
>                 3);<br>
><br>
> I read in<br>
><br>
> <a href="http://www.spice-space.org/page/Whiteboard/AgentProtocol#Clipboard" rel="noreferrer" target="_blank">http://www.spice-space.org/page/Whiteboard/AgentProtocol#Clipboard</a><br>
> <a href="http://www.spice-space.org/docs/spice-gtk/SpiceMainChannel.html#SpiceMainChannel-main-clipboard-selection-request" rel="noreferrer" target="_blank">http://www.spice-space.org/docs/spice-gtk/SpiceMainChannel.html#SpiceMainChannel-main-clipboard-selection-request</a><br>
><br>
> that sending possible if guest clipboard released<br>
> and client clipboard data requested.<br>
> But i don't know how to emit request signal for this.<br>
> Maybe i not understand the logic of clipboard data moving.<br>
> Need help or detail description. :)<br>
<br>
</span>Can you be more specific about what you are doing?<br>
Do you have an application based on spice-gtk or spice-glib? Have you<br>
checked how spicy (for example) handles copy and paste? Or are you<br>
trying to do something special which spicy/remote-viewer are not doing?<br>
<br>
Also, I assume you checked that with the applications mentioned above,<br>
copy and paste works? (ie the agent is running in the guest, and working<br>
as expected, it's only a problem with your code?)<br>
<span><font color="#888888"><br>
Christophe<br>
</font></span></blockquote></div><br></div>
</div></div></div><br></div>