From aa860552fd7e2888258a7b48b8c3bd4af527dc6c Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Sun, 1 Nov 2009 18:19:08 +0000 Subject: 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 --- hw/xwin/InitOutput.c | 5 ++--- hw/xwin/XWin.man.pre | 7 +++---- hw/xwin/winglobals.c | 2 +- hw/xwin/winprocarg.c | 12 ++++++++++++ 4 files changed, 18 insertions(+), 8 deletions(-) (limited to 'hw') diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c index 0bf79185e..8fd82d087 100644 --- a/hw/xwin/InitOutput.c +++ b/hw/xwin/InitOutput.c @@ -811,9 +811,8 @@ winUseMsg (void) "\tmonitors are present.\n"); #ifdef XWIN_CLIPBOARD - ErrorF ("-clipboard\n" - "\tRun the clipboard integration module.\n" - "\tDo not use at the same time as 'xwinclip'.\n"); + ErrorF ("-[no]clipboard\n" + "\tEnable [disable] the clipboard integration. Default is enabled.\n"); ErrorF ("-nounicodeclipboard\n" "\tDo not use Unicode clipboard even if NT-based platform.\n"); diff --git a/hw/xwin/XWin.man.pre b/hw/xwin/XWin.man.pre index 9649e2e60..0bad65c60 100644 --- a/hw/xwin/XWin.man.pre +++ b/hw/xwin/XWin.man.pre @@ -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, \fIall\fP of which are optional: .TP 8 -.B \-clipboard -Enables the integration -between the Cygwin/X clipboard and Windows clipboard. Do not use in -conjunction with the \fIxwinclip\fP program. +.B \-[no]clipboard +Enables [disables] the integration between the Cygwin/X clipboard and +Windows clipboard. The default is enabled. .TP 8 .B "\-clipupdates \fInum_boxes\fP" Specify an optional threshold, above which the boxes in a shadow diff --git a/hw/xwin/winglobals.c b/hw/xwin/winglobals.c index 57b3bf3b8..7bb4a602d 100644 --- a/hw/xwin/winglobals.c +++ b/hw/xwin/winglobals.c @@ -114,7 +114,7 @@ winDispatchProcPtr winProcSetSelectionOwnerOrig = NULL; */ Bool g_fUnicodeClipboard = TRUE; -Bool g_fClipboard = FALSE; +Bool g_fClipboard = TRUE; Bool g_fClipboardLaunched = FALSE; Bool g_fClipboardStarted = FALSE; pthread_t g_ptClipboardProc; diff --git a/hw/xwin/winprocarg.c b/hw/xwin/winprocarg.c index 3732ecb63..31e505e8d 100755 --- a/hw/xwin/winprocarg.c +++ b/hw/xwin/winprocarg.c @@ -889,8 +889,20 @@ ddxProcessArgument (int argc, char *argv[], int i) */ if (IS_OPTION ("-clipboard")) { + /* Now the default, we still accept the arg for backwards compatibility */ 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 */ return 1; } -- cgit v1.2.3