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.
diff --git a/vncviewer/OptionsDialog.cxx b/vncviewer/OptionsDialog.cxx
index 3c8fcb4..f112a52 100644
--- a/vncviewer/OptionsDialog.cxx
+++ b/vncviewer/OptionsDialog.cxx
@@ -264,7 +264,9 @@
   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 @@
   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 @@
                                                        _("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 a6b504e..39bd7af 100644
--- a/vncviewer/OptionsDialog.h
+++ b/vncviewer/OptionsDialog.h
@@ -107,7 +107,9 @@
   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 1bc0b82..a12f783 100644
--- a/vncviewer/Viewport.cxx
+++ b/vncviewer/Viewport.cxx
@@ -403,8 +403,10 @@
 
   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 7cce1cd..9a9b9fd 100644
--- a/vncviewer/parameters.cxx
+++ b/vncviewer/parameters.cxx
@@ -122,10 +122,12 @@
                               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 @@
   &shared,
   &acceptClipboard,
   &sendClipboard,
+#if !defined(WIN32) && !defined(__APPLE__)
   &sendPrimary,
+#endif
   &menuKey,
   &fullscreenSystemKeys
 };
diff --git a/vncviewer/parameters.h b/vncviewer/parameters.h
index 0de61d2..e4378c8 100644
--- a/vncviewer/parameters.h
+++ b/vncviewer/parameters.h
@@ -52,7 +52,9 @@
 
 extern rfb::BoolParameter acceptClipboard;
 extern rfb::BoolParameter sendClipboard;
+#if !defined(WIN32) && !defined(__APPLE__)
 extern rfb::BoolParameter sendPrimary;
+#endif
 
 extern rfb::StringParameter menuKey;