From 3c94310c9e0f33758c9a25e25aba28e1021ea59d Mon Sep 17 00:00:00 2001 From: Xinyu Hou Date: Thu, 15 Sep 2016 15:19:17 -0400 Subject: [PATCH] #123 Read clipboard sharing option and pass it to all clients --- src/lib/client/ServerProxy.cpp | 3 +++ src/lib/server/Config.cpp | 4 ++++ src/lib/synergy/option_types.h | 1 + 3 files changed, 8 insertions(+) diff --git a/src/lib/client/ServerProxy.cpp b/src/lib/client/ServerProxy.cpp index 773cdc16..fc84fd21 100644 --- a/src/lib/client/ServerProxy.cpp +++ b/src/lib/client/ServerProxy.cpp @@ -833,6 +833,9 @@ ServerProxy::setOptions() // update keep alive setKeepAliveRate(1.0e-3 * static_cast(options[i + 1])); } + else if (options[i] == kOptionClipboardSharing) { + LOG((CLOG_DEBUG "disable clipboard sharing")); + } if (id != kKeyModifierIDNull) { m_modifierTranslationTable[id] = static_cast(options[i + 1]); diff --git a/src/lib/server/Config.cpp b/src/lib/server/Config.cpp index 87cf0b7f..4b87764f 100644 --- a/src/lib/server/Config.cpp +++ b/src/lib/server/Config.cpp @@ -765,6 +765,10 @@ Config::readSectionOptions(ConfigReadContext& s) else if (name == "win32KeepForeground") { addOption("", kOptionWin32KeepForeground, s.parseBoolean(value)); } + else if (name == "enableClipboard") { + addOption("", kOptionClipboardSharing, s.parseBoolean(value)); + } + else { handled = false; } diff --git a/src/lib/synergy/option_types.h b/src/lib/synergy/option_types.h index ca634571..3e4328b8 100644 --- a/src/lib/synergy/option_types.h +++ b/src/lib/synergy/option_types.h @@ -67,6 +67,7 @@ static const OptionID kOptionXTestXineramaUnaware = OPTION_CODE("XTXU"); static const OptionID kOptionScreenPreserveFocus = OPTION_CODE("SFOC"); static const OptionID kOptionRelativeMouseMoves = OPTION_CODE("MDLT"); static const OptionID kOptionWin32KeepForeground = OPTION_CODE("_KFW"); +static const OptionID kOptionClipboardSharing = OPTION_CODE("CLPS"); //@} //! @name Screen switch corner enumeration