]> source.dussan.org Git - tigervnc.git/commitdiff
Only show sendPrimary on X11 platforms
authorPierre Ossman <ossman@cendio.se>
Thu, 10 Dec 2015 20:24:08 +0000 (21:24 +0100)
committerPierre Ossman <ossman@cendio.se>
Fri, 11 Dec 2015 17:42:15 +0000 (18:42 +0100)
Primary selection is inherently a X11 concept so there is no point
showing the settings related to it on other platforms.

vncviewer/OptionsDialog.cxx
vncviewer/OptionsDialog.h
vncviewer/Viewport.cxx
vncviewer/parameters.cxx
vncviewer/parameters.h

index 3c8fcb48c974c5d4ebde7f6b8231cb3c501c28c0..f112a529531936a44cc2c59c1417e4762177b356 100644 (file)
@@ -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,
index a6b504e9a4af14d058a967047ae8843adefa97eb..39bd7afa633fe77529ede44938c4540e620d58f1 100644 (file)
@@ -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;
 
index 1bc0b8219ff801ac1040543734ecf16e79ed4965..a12f783b07ea47e024e02411a10e1d3d95175e23 100644 (file)
@@ -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);
 }
index 7cce1cd701cc77eee4ac421dbf9c909b8522e050..9a9b9fd75753910c1ce8a5a8cae4fc276a8457b8 100644 (file)
@@ -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
 };
index 0de61d2fa5b4bff6760408064daa87f890d0859e..e4378c85e604892ad10aa6a2c6f7f48601b91975 100644 (file)
@@ -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;