diff options
author | Pierre Ossman <ossman@cendio.se> | 2021-01-04 13:17:40 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2021-01-04 13:17:40 +0100 |
commit | 07935033b538e18ca428588c33dab67d70e79c5b (patch) | |
tree | 4e926a5fef66bd489e756e286560a0a2ba7be419 /vncviewer | |
parent | 1ea0f9f2109c12057c5fddc67ae3929928a3d7b1 (diff) | |
download | tigervnc-07935033b538e18ca428588c33dab67d70e79c5b.tar.gz tigervnc-07935033b538e18ca428588c33dab67d70e79c5b.zip |
Improve clipboard debug logging in viewer
Diffstat (limited to 'vncviewer')
-rw-r--r-- | vncviewer/Viewport.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx index b5466acb..d7203ea2 100644 --- a/vncviewer/Viewport.cxx +++ b/vncviewer/Viewport.cxx @@ -291,12 +291,8 @@ void Viewport::handleClipboardAnnounce(bool available) if (!acceptClipboard) return; - if (available) - vlog.debug("Got notification of new clipboard on server"); - else - vlog.debug("Clipboard is no longer available on server"); - if (!available) { + vlog.debug("Clipboard is no longer available on server"); pendingServerClipboard = false; return; } @@ -304,10 +300,12 @@ void Viewport::handleClipboardAnnounce(bool available) pendingClientClipboard = false; if (!hasFocus()) { + vlog.debug("Got notification of new clipboard on server whilst not focused, will request data later"); pendingServerClipboard = true; return; } + vlog.debug("Got notification of new clipboard on server, requesting data"); cc->requestClipboard(); } @@ -759,12 +757,14 @@ void Viewport::handleClipboardChange(int source, void *data) self->pendingServerClipboard = false; if (!self->hasFocus()) { + vlog.debug("Local clipboard changed whilst not focused, will notify server later"); self->pendingClientClipboard = true; // Clear any older client clipboard from the server self->cc->announceClipboard(false); return; } + vlog.debug("Local clipboard changed, notifying server"); try { self->cc->announceClipboard(true); } catch (rdr::Exception& e) { @@ -777,6 +777,7 @@ void Viewport::handleClipboardChange(int source, void *data) void Viewport::flushPendingClipboard() { if (pendingServerClipboard) { + vlog.debug("Focus regained after remote clipboard change, requesting data"); try { cc->requestClipboard(); } catch (rdr::Exception& e) { @@ -785,6 +786,7 @@ void Viewport::flushPendingClipboard() } } if (pendingClientClipboard) { + vlog.debug("Focus regained after local clipboard change, notifying server"); try { cc->announceClipboard(true); } catch (rdr::Exception& e) { |