[Spice-devel] Spice, VDAgent, and Clipboard

Nick Couchman vnick at apache.org
Tue Jul 5 19:33:33 UTC 2022


On Sun, Jul 3, 2022 at 2:40 PM Nick Couchman <vnick at apache.org> wrote:

> Then, once the clipboard is settled on the client side, I call
> guac_main_channel_clipboard_selection_notify() to send the data along,
> followed by guac_main_channel_clipboard_selection_release() to release the
> previously-called grab:
>
> --
>     /* Send via VNC only if finished connecting */
>     if (spice_client->main_channel != NULL) {
>
> spice_main_channel_clipboard_selection_notify(spice_client->main_channel,
>             VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD,
>             VD_AGENT_CLIPBOARD_UTF8_TEXT,
>             (const unsigned char*) input,
>             spice_client->clipboard->length);
>
> spice_main_channel_clipboard_selection_release(spice_client->main_channel,
>             VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD);
>     }
> --
>
>
To answer my own question, this was the issue - apparently the call to
spice_main_channel_clipboard_selection_release() actually clears the
clipboard. Removing this call allows the clipboard from client (Guacamole)
to Spice server to function properly. I'm not sure if there's anything that
needs to be done to "ungrab" the clipboard after sending the data, or if it
is done automatically?

-Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20220705/1dcb1d33/attachment.htm>


More information about the Spice-devel mailing list