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

Hans de Goede hdegoede at redhat.com
Fri Dec 2 01:59:28 PST 2011


Hi,

On 12/01/2011 06:33 PM, Alon Levy wrote:
> 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).

Yes, but indeed only as an example, since we don't want to expose
the raw agent capabilities so for any new capability we want to
expose to any apps using spice-gtk we would need a new property.

Regards,

Hans


More information about the Spice-devel mailing list