Respond to clipb request with an unsupported type with data with a none type

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.
This commit is contained in:
Hans de Goede 2010-10-01 20:14:16 +02:00
parent a2d645ffe3
commit bc9f00961f

View File

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