[Spice-devel] spice-gtk: How to deal with an agent which is not clipboard capable?

Alon Levy alevy at redhat.com
Thu Dec 1 09:33:59 PST 2011

On Thu, Dec 01, 2011 at 04:55:56PM +0100, Hans de Goede wrote:
> Hi,
> Currently if there is an agent inside a vm, but it is an old,
> non copy paste capable versino, every time you select something
> inside your client X session, spice-gtk prints the following:
> (spicy:31971): GSpice-CRITICAL **: agent_clipboard_release: assertion `VD_AGENT_HAS_CAPABILITY(c->agent_caps, sizeof(c->agent_caps), VD_AGENT_CAP_CLIPBOARD_BY_DEMAND)' failed
> (spicy:31971): GSpice-CRITICAL **: agent_clipboard_grab: assertion `VD_AGENT_HAS_CAPABILITY(c->agent_caps, sizeof(c->agent_caps), VD_AGENT_CAP_CLIPBOARD_BY_DEMAND)' failed
> So this has made me think about this, one could argue that the warn_if_fail,
> should be turned into a simple test and return. But that is just a quick
> fix, ideally spicy (and other users of spice-gtk) would show the
> auto-clipboard and copy from / to guest clipboard entries grayed out.
> This would require adding a property to the main channel to find
> out of it is copy paste capable, and proxying that property
> in spice-session. Then spicy could watch (select notification)
> that property, and if it changes disable (grey out) / enable
> the relevant UI bits. Does this sound like a good plan, or
> do you believe that it is too much code for a little polish?

Well, hazarding on the over engineering side, this would be useful for
any other agent capabilities later on (at the minimum as an example).

> Regards,
> Hans
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel

More information about the Spice-devel mailing list