[Spice-devel] [PATCH] vd_agent: add protocol messages for clipboard/selection-owner model

Arnon Gilboa agilboa at redhat.com
Wed Sep 22 02:47:00 PDT 2010


with the current msgs we can use multiple GRAB(type)s & REQUEST(type)s ;)

Alexander Larsson wrote:
> On Tue, 2010-09-21 at 09:31 +0200, Arnon Gilboa wrote:
>   
>> pasting clipboard data is now "only-by-demand" from both sides (client and agent), whose behavior is symmetric.
>>
>> -VD_AGENT_CLIPBOARD_GRAB(type) - tell the other side that an application in our side ("we") got ownership of the clipboard.
>> -VD_AGENT_CLIPBOARD_REQUEST(type) - after we know the other side owns the clipboard (GRAB received), we notify the os we are the owner. when we are asked by the os/app for the clipboard data, we send this REQUEST msg to the other side.
>> -VD_AGENT_CLIPBOARD(type, data) - the existing message for sending the clipboard, is now sent only in response to REQUEST.
>> -VD_AGENT_CLIPBOARD_RELEASE - tell the other side that we are no longer the owner of the clipboard (e.g. the owner app was closed).
>>
>> this patch will be followed by agent & client patches handling the above messages.
>> ---
>>     
>
> One possible issue i see with this is that this only allows us to
> specify one type for the clipboard context. Whereas in both win32 and X
> you can claim several formats and then the consumer side can pick which
> one to use (i.e. a web browser would support copy as html or copy as
> text, etc).
>
> I'm not sure we want to really support this, as it increases the
> complexity of cut and paste quite a bit, and is perhaps not as important
> as just getting text cut and paste working.
>
>   



More information about the Spice-devel mailing list