aboutsummaryrefslogtreecommitdiffstats
path: root/vncviewer
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2015-12-10 21:24:08 +0100
committerPierre Ossman <ossman@cendio.se>2015-12-11 18:42:15 +0100
commitf7fef928f910ac4a7bff869567d250e956b9edbc (patch)
treede80e2991a5b5dca59d3a9f7a2dcf0b8e3532799 /vncviewer
parent769931efdfc815160c0e6714ab0860ae3702adf1 (diff)
downloadtigervnc-f7fef928f910ac4a7bff869567d250e956b9edbc.tar.gz
tigervnc-f7fef928f910ac4a7bff869567d250e956b9edbc.zip
Only show sendPrimary on X11 platforms
Primary selection is inherently a X11 concept so there is no point showing the settings related to it on other platforms.
Diffstat (limited to 'vncviewer')
-rw-r--r--vncviewer/OptionsDialog.cxx6
-rw-r--r--vncviewer/OptionsDialog.h2
-rw-r--r--vncviewer/Viewport.cxx2
-rw-r--r--vncviewer/parameters.cxx4
-rw-r--r--vncviewer/parameters.h2
5 files changed, 16 insertions, 0 deletions
diff --git a/vncviewer/OptionsDialog.cxx b/vncviewer/OptionsDialog.cxx
index 3c8fcb48..f112a529 100644
--- a/vncviewer/OptionsDialog.cxx
+++ b/vncviewer/OptionsDialog.cxx
@@ -264,7 +264,9 @@ void OptionsDialog::loadOptions(void)
viewOnlyCheckbox->value(viewOnly);
acceptClipboardCheckbox->value(acceptClipboard);
sendClipboardCheckbox->value(sendClipboard);
+#if !defined(WIN32) && !defined(__APPLE__)
sendPrimaryCheckbox->value(sendPrimary);
+#endif
systemKeysCheckbox->value(fullscreenSystemKeys);
menuKeyChoice->value(0);
@@ -372,7 +374,9 @@ void OptionsDialog::storeOptions(void)
viewOnly.setParam(viewOnlyCheckbox->value());
acceptClipboard.setParam(acceptClipboardCheckbox->value());
sendClipboard.setParam(sendClipboardCheckbox->value());
+#if !defined(WIN32) && !defined(__APPLE__)
sendPrimary.setParam(sendPrimaryCheckbox->value());
+#endif
fullscreenSystemKeys.setParam(systemKeysCheckbox->value());
if (menuKeyChoice->value() == 0)
@@ -698,11 +702,13 @@ void OptionsDialog::createInputPage(int tx, int ty, int tw, int th)
_("Send clipboard to server")));
ty += CHECK_HEIGHT + TIGHT_MARGIN;
+#if !defined(WIN32) && !defined(__APPLE__)
sendPrimaryCheckbox = new Fl_Check_Button(LBLRIGHT(tx, ty,
CHECK_MIN_WIDTH,
CHECK_HEIGHT,
_("Send primary selection and cut buffer as clipboard")));
ty += CHECK_HEIGHT + TIGHT_MARGIN;
+#endif
systemKeysCheckbox = new Fl_Check_Button(LBLRIGHT(tx, ty,
CHECK_MIN_WIDTH,
diff --git a/vncviewer/OptionsDialog.h b/vncviewer/OptionsDialog.h
index a6b504e9..39bd7afa 100644
--- a/vncviewer/OptionsDialog.h
+++ b/vncviewer/OptionsDialog.h
@@ -107,7 +107,9 @@ protected:
Fl_Check_Button *viewOnlyCheckbox;
Fl_Check_Button *acceptClipboardCheckbox;
Fl_Check_Button *sendClipboardCheckbox;
+#if !defined(WIN32) && !defined(__APPLE__)
Fl_Check_Button *sendPrimaryCheckbox;
+#endif
Fl_Check_Button *systemKeysCheckbox;
Fl_Choice *menuKeyChoice;
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx
index 1bc0b821..a12f783b 100644
--- a/vncviewer/Viewport.cxx
+++ b/vncviewer/Viewport.cxx
@@ -403,8 +403,10 @@ void Viewport::handleClipboardChange(int source, void *data)
assert(self);
+#if !defined(WIN32) && !defined(__APPLE__)
if (!sendPrimary && (source == 0))
return;
+#endif
Fl::paste(*self, source);
}
diff --git a/vncviewer/parameters.cxx b/vncviewer/parameters.cxx
index 7cce1cd7..9a9b9fd7 100644
--- a/vncviewer/parameters.cxx
+++ b/vncviewer/parameters.cxx
@@ -122,10 +122,12 @@ BoolParameter acceptClipboard("AcceptClipboard",
true);
BoolParameter sendClipboard("SendClipboard",
"Send clipboard changes to the server", true);
+#if !defined(WIN32) && !defined(__APPLE__)
BoolParameter sendPrimary("SendPrimary",
"Send the primary selection and cut buffer to the "
"server as well as the clipboard selection",
true);
+#endif
StringParameter menuKey("MenuKey", "The key which brings up the popup menu",
"F8");
@@ -165,7 +167,9 @@ static VoidParameter* parameterArray[] = {
&shared,
&acceptClipboard,
&sendClipboard,
+#if !defined(WIN32) && !defined(__APPLE__)
&sendPrimary,
+#endif
&menuKey,
&fullscreenSystemKeys
};
diff --git a/vncviewer/parameters.h b/vncviewer/parameters.h
index 0de61d2f..e4378c85 100644
--- a/vncviewer/parameters.h
+++ b/vncviewer/parameters.h
@@ -52,7 +52,9 @@ extern rfb::BoolParameter shared;
extern rfb::BoolParameter acceptClipboard;
extern rfb::BoolParameter sendClipboard;
+#if !defined(WIN32) && !defined(__APPLE__)
extern rfb::BoolParameter sendPrimary;
+#endif
extern rfb::StringParameter menuKey;