Add VNC clipboard sync

RFB's ServerCutText/ClientCutText messages are much simpler than RDP's
CLIPRDR channel (no format-list/format-request negotiation -- text is
just sent directly in both directions), so ServerCutText now emits
remoteClipboardTextChanged instead of being discarded, and
VncSessionBackend overrides setClipboardText to send ClientCutText
immediately. Extends session_tab.cpp's clipboard-sync gate to cover
VNC alongside RDP; the QClipboard wiring itself was already
protocol-agnostic. Latin-1 only, per RFB's wire format -- no Unicode
clipboard extension is in scope.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-15 20:31:03 -06:00
co-authored by Claude Sonnet 5
parent 35d4daec7f
commit 3dd894407a
4 changed files with 134 additions and 5 deletions
+3 -2
View File
@@ -77,8 +77,9 @@ SessionTab::SessionTab(const Profile& profile,
m_terminalFontPointSize(preferences.terminalFontPointSize > 0
? preferences.terminalFontPointSize
: 0),
m_clipboardSyncSupported(profile.protocol.compare(QStringLiteral("RDP"), Qt::CaseInsensitive)
== 0),
m_clipboardSyncSupported(
profile.protocol.compare(QStringLiteral("RDP"), Qt::CaseInsensitive) == 0
|| profile.protocol.compare(QStringLiteral("VNC"), Qt::CaseInsensitive) == 0),
m_sshTerminal(nullptr),
m_rdpDisplay(nullptr),
m_vncDisplay(nullptr),