On Tue, Jul 12, 2022 at 2:27 AM Victor Toso <victortoso@xxxxxxxxxx> wrote:
Hi Nick,
> 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?
IIRC, the "ungrab" on client-side should happen when the Widget
is not on focus anymore. I think it is fine to keep the "grab"
while the widget has focus.
Ah, okay - I'll have to take a look at that and see if there's another place where I should be triggering the release when things go out-of-focus.
There are several scenarios around this, so it can be a bit
tricky to understand/debug, specially the differences between X11
and Wayland. For example, the comment in owner_change's callback:
https://gitlab.freedesktop.org/spice/spice-gtk/-/blob/master/src/spice-gtk-session.c#L721
In the past, we used to have some race conditions that I'd bet
you should be hitting with your dev environment but, if you are
not, it should be thanks to the fixes for
https://gitlab.freedesktop.org/spice/spice-gtk/-/issues/82
Right now things seem to be working as expected, and I'm not seeing any odd behaviors that would indicate race conditions, but maybe I just haven't hit it, yet :-).
Thanks for your interest in SPICE, I'm looking forward to testing
Guacamole (the food I already love!) :)
Always happy to have more users and testers. If you're at all interested in testing it, or just looking at my code to see what I'm doing wrong, here are the branches:
(in the src/protocols/spice directory)
(just basic stuff for adding the protocol to the client - most of the "real" work is done in guacamole-server).
Right now I'm working on getting audio input going, then on to file transfers.
-NIck