Cygwin/X: Enable clipboard integration by default

Enable clipboard integration by default, can be turned off with -noclipboard.
We still accept -clipboard for backwards compatibility.  If both are passed,
the last one is accepted (just as other arguments are handled).

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
This commit is contained in:
Yaakov Selkowitz 2009-11-01 18:19:08 +00:00 committed by Jon TURNEY
parent 87b00ced3d
commit aa860552fd
4 changed files with 18 additions and 8 deletions

View File

@ -811,9 +811,8 @@ winUseMsg (void)
"\tmonitors are present.\n"); "\tmonitors are present.\n");
#ifdef XWIN_CLIPBOARD #ifdef XWIN_CLIPBOARD
ErrorF ("-clipboard\n" ErrorF ("-[no]clipboard\n"
"\tRun the clipboard integration module.\n" "\tEnable [disable] the clipboard integration. Default is enabled.\n");
"\tDo not use at the same time as 'xwinclip'.\n");
ErrorF ("-nounicodeclipboard\n" ErrorF ("-nounicodeclipboard\n"
"\tDo not use Unicode clipboard even if NT-based platform.\n"); "\tDo not use Unicode clipboard even if NT-based platform.\n");

View File

@ -80,10 +80,9 @@ In addition to the normal server options described in the \fIXserver(1)\fP
manual page, \fIXWin\fP accepts the following command line switches, manual page, \fIXWin\fP accepts the following command line switches,
\fIall\fP of which are optional: \fIall\fP of which are optional:
.TP 8 .TP 8
.B \-clipboard .B \-[no]clipboard
Enables the integration Enables [disables] the integration between the Cygwin/X clipboard and
between the Cygwin/X clipboard and Windows clipboard. Do not use in Windows clipboard. The default is enabled.
conjunction with the \fIxwinclip\fP program.
.TP 8 .TP 8
.B "\-clipupdates \fInum_boxes\fP" .B "\-clipupdates \fInum_boxes\fP"
Specify an optional threshold, above which the boxes in a shadow Specify an optional threshold, above which the boxes in a shadow

View File

@ -114,7 +114,7 @@ winDispatchProcPtr winProcSetSelectionOwnerOrig = NULL;
*/ */
Bool g_fUnicodeClipboard = TRUE; Bool g_fUnicodeClipboard = TRUE;
Bool g_fClipboard = FALSE; Bool g_fClipboard = TRUE;
Bool g_fClipboardLaunched = FALSE; Bool g_fClipboardLaunched = FALSE;
Bool g_fClipboardStarted = FALSE; Bool g_fClipboardStarted = FALSE;
pthread_t g_ptClipboardProc; pthread_t g_ptClipboardProc;

View File

@ -889,8 +889,20 @@ ddxProcessArgument (int argc, char *argv[], int i)
*/ */
if (IS_OPTION ("-clipboard")) if (IS_OPTION ("-clipboard"))
{ {
/* Now the default, we still accept the arg for backwards compatibility */
g_fClipboard = TRUE; g_fClipboard = TRUE;
/* Indicate that we have processed this argument */
return 1;
}
/*
* Look for the '-noclipboard' argument
*/
if (IS_OPTION ("-noclipboard"))
{
g_fClipboard = FALSE;
/* Indicate that we have processed this argument */ /* Indicate that we have processed this argument */
return 1; return 1;
} }