[Spice-devel] [PATCH spice 06/17] Respond to clipb request with an unsupported type with data with a none type

Arnon Gilboa agilboa at redhat.com
Mon Oct 4 07:10:00 PDT 2010


Hans de Goede wrote:
> Currently we send a VD_AGENT_CLIPBOARD_RELEASE when we receive a
> VD_AGENT_CLIPBOARD_REQUEST with a type which we do not support. This is not
> correct, as this means given up clipboard ownership while we may be able
> to answer requests with different types. The correct response is to
> nack the request by sending a VD_AGENT_CLIPBOARD (data) message with a type
> of VD_AGENT_CLIPBOARD_NONE.
> ---
>  client/red_client.cpp |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/client/red_client.cpp b/client/red_client.cpp
> index e351900..99e79a5 100644
> --- a/client/red_client.cpp
> +++ b/client/red_client.cpp
> @@ -1095,7 +1095,7 @@ void RedClient::dispatch_agent_message(VDAgentMessage* msg, void* data)
>          break;
>      case VD_AGENT_CLIPBOARD_REQUEST:
>          if (!Platform::request_clipboard_notification(((VDAgentClipboardRequest*)data)->type)) {
> -            send_agent_clipboard_message(VD_AGENT_CLIPBOARD_RELEASE);
> +            on_clipboard_notify(VD_AGENT_CLIPBOARD_NONE, NULL, 0);
>          }
>          break;
>      case VD_AGENT_CLIPBOARD_RELEASE:
>   
Ack


More information about the Spice-devel mailing list