summaryrefslogtreecommitdiffstats
path: root/vncviewer
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2019-04-01 14:24:27 +0200
committerPierre Ossman <ossman@cendio.se>2019-04-01 14:24:27 +0200
commit5cd3ff660815537c66ffe898167cad026338abdc (patch)
treef6f583a011848a91deaefddd0af96dbf4f8a6c3c /vncviewer
parent88a94ed13ac4574d762cbf1486a701cde2ba1f9b (diff)
downloadtigervnc-5cd3ff660815537c66ffe898167cad026338abdc.tar.gz
tigervnc-5cd3ff660815537c66ffe898167cad026338abdc.zip
Hide setPrimary parameter on non-X11 platforms
It is already hidden in the UI, so make sure it also is gone as a command line parameter. This follows the behaviour of the similar sendPrimary parameter.
Diffstat (limited to 'vncviewer')
-rw-r--r--vncviewer/Viewport.cxx4
-rw-r--r--vncviewer/parameters.cxx6
2 files changed, 7 insertions, 3 deletions
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx
index 4e0044c9..5df5c796 100644
--- a/vncviewer/Viewport.cxx
+++ b/vncviewer/Viewport.cxx
@@ -262,8 +262,10 @@ void Viewport::serverCutText(const char* str, rdr::U32 len)
// RFB doesn't have separate selection and clipboard concepts, so we
// dump the data into both variants.
+#if !defined(WIN32) && !defined(__APPLE__)
if (setPrimary)
Fl::copy(buffer, ret, 0);
+#endif
Fl::copy(buffer, ret, 1);
delete [] buffer;
@@ -752,8 +754,10 @@ void Viewport::flushPendingClipboard()
{
if (pendingServerCutText) {
size_t len = strlen(pendingServerCutText);
+#if !defined(WIN32) && !defined(__APPLE__)
if (setPrimary)
Fl::copy(pendingServerCutText, len, 0);
+#endif
Fl::copy(pendingServerCutText, len, 1);
}
if (pendingClientCutText) {
diff --git a/vncviewer/parameters.cxx b/vncviewer/parameters.cxx
index 84278186..e5ff4e63 100644
--- a/vncviewer/parameters.cxx
+++ b/vncviewer/parameters.cxx
@@ -124,12 +124,12 @@ BoolParameter shared("Shared",
BoolParameter acceptClipboard("AcceptClipboard",
"Accept clipboard changes from the server",
true);
-BoolParameter setPrimary("SetPrimary",
- "Set the primary selection as well as the "
- "clipboard selection", true);
BoolParameter sendClipboard("SendClipboard",
"Send clipboard changes to the server", true);
#if !defined(WIN32) && !defined(__APPLE__)
+BoolParameter setPrimary("SetPrimary",
+ "Set the primary selection as well as the "
+ "clipboard selection", true);
BoolParameter sendPrimary("SendPrimary",
"Send the primary selection to the "
"server as well as the clipboard selection",