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