From d6612d8d42a9bc7c17fe17fe91862d6cfb577741 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 5 Jan 2021 10:25:54 +0100 Subject: Add debug logging for ignored clipboard events --- common/rfb/VNCServerST.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'common/rfb/VNCServerST.cxx') diff --git a/common/rfb/VNCServerST.cxx b/common/rfb/VNCServerST.cxx index 17e963e8..fe060857 100644 --- a/common/rfb/VNCServerST.cxx +++ b/common/rfb/VNCServerST.cxx @@ -515,8 +515,10 @@ void VNCServerST::handleClipboardAnnounce(VNCSConnectionST* client, void VNCServerST::handleClipboardData(VNCSConnectionST* client, const char* data) { - if (client != clipboardClient) + if (client != clipboardClient) { + slog.debug("Ignoring unexpected clipboard data"); return; + } desktop->handleClipboardData(data); } -- cgit v1.2.3 From 49122f6dccd836f0a4618247895fd4c5b8db7af0 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 5 Jan 2021 10:26:10 +0100 Subject: Update desktop if clipboard client goes away So the current clipboard state is properly reflected in the desktop session. --- common/rfb/VNCServerST.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/rfb/VNCServerST.cxx') diff --git a/common/rfb/VNCServerST.cxx b/common/rfb/VNCServerST.cxx index fe060857..ae51a61b 100644 --- a/common/rfb/VNCServerST.cxx +++ b/common/rfb/VNCServerST.cxx @@ -169,7 +169,7 @@ void VNCServerST::removeSocket(network::Socket* sock) { if (pointerClient == *ci) pointerClient = NULL; if (clipboardClient == *ci) - clipboardClient = NULL; + handleClipboardAnnounce(*ci, false); clipboardRequestors.remove(*ci); // - Delete the per-Socket resources -- cgit v1.2.3