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

Hans de Goede hdegoede at redhat.com
Mon Oct 4 03:34:57 PDT 2010


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:
-- 
1.7.2.2



More information about the Spice-devel mailing list