aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winprocarg.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin/winprocarg.c')
-rw-r--r--xorg-server/hw/xwin/winprocarg.c123
1 files changed, 84 insertions, 39 deletions
diff --git a/xorg-server/hw/xwin/winprocarg.c b/xorg-server/hw/xwin/winprocarg.c
index 858be4a56..570b91721 100644
--- a/xorg-server/hw/xwin/winprocarg.c
+++ b/xorg-server/hw/xwin/winprocarg.c
@@ -44,6 +44,7 @@ from The Open Group.
#ifdef XWIN_CLIPBOARD
extern Bool g_fUnicodeClipboard;
extern Bool g_fClipboard;
+extern Bool g_fClipboardPrimary;
#endif
/*
@@ -84,9 +85,9 @@ winInitializeScreenDefaults(void)
dwWidth = GetSystemMetrics(SM_CXSCREEN);
dwHeight = GetSystemMetrics(SM_CYSCREEN);
- winErrorFVerb(2,
- "winInitializeScreenDefaults - primary monitor w %d h %d\n",
- (int) dwWidth, (int) dwHeight);
+ winDebug (
+ "winInitializeScreenDefaults - primary monitor w %d h %d\n",
+ (int) dwWidth, (int) dwHeight);
/* Set a default DPI, if no '-dpi' option was used */
if (monitorResolution == 0) {
@@ -96,17 +97,17 @@ winInitializeScreenDefaults(void)
int dpiX = GetDeviceCaps(hdc, LOGPIXELSX);
int dpiY = GetDeviceCaps(hdc, LOGPIXELSY);
- winErrorFVerb(2,
- "winInitializeScreenDefaults - native DPI x %d y %d\n",
- dpiX, dpiY);
+ winDebug(
+ "winInitializeScreenDefaults - native DPI x %d y %d\n",
+ dpiX, dpiY);
monitorResolution = dpiY;
ReleaseDC(NULL, hdc);
}
else {
- winErrorFVerb(1,
- "winInitializeScreenDefaults - Failed to retrieve native DPI, falling back to default of %d DPI\n",
- WIN_DEFAULT_DPI);
+ winDebug(
+ "winInitializeScreenDefaults - Failed to retrieve native DPI, falling back to default of %d DPI\n",
+ WIN_DEFAULT_DPI);
monitorResolution = WIN_DEFAULT_DPI;
}
}
@@ -131,6 +132,8 @@ winInitializeScreenDefaults(void)
defaultScreenInfo.fDecoration = TRUE;
#ifdef XWIN_MULTIWINDOWEXTWM
defaultScreenInfo.fMWExtWM = FALSE;
+#endif
+#ifdef XWIN_MULTIWINDOWINTWM
defaultScreenInfo.fInternalWM = FALSE;
#endif
defaultScreenInfo.fRootless = FALSE;
@@ -157,7 +160,7 @@ winInitializeScreenDefaults(void)
static void
winInitializeScreen(int i)
{
- winErrorFVerb(3, "winInitializeScreen - %d\n", i);
+ winDebug ("winInitializeScreen - %d\n",i);
/* Initialize default screen values, if needed */
winInitializeScreenDefaults();
@@ -174,7 +177,7 @@ winInitializeScreens(int maxscreens)
{
int i;
- winErrorFVerb(3, "winInitializeScreens - %i\n", maxscreens);
+ winDebug ("winInitializeScreens - %i\n", maxscreens);
if (maxscreens > g_iNumScreens) {
/* Reallocate the memory for DDX-specific screen info */
@@ -248,23 +251,22 @@ ddxProcessArgument(int argc, char *argv[], int i)
* OsVendorInit () gets called, otherwise we will overwrite
* settings changed by parameters such as -fullscreen, etc.
*/
- winErrorFVerb(2, "ddxProcessArgument - Initializing default "
- "screens\n");
+ winDebug ("ddxProcessArgument - Initializing default "
+ "screens\n");
winInitializeScreenDefaults();
}
}
-#if CYGDEBUG
winDebug("ddxProcessArgument - arg: %s\n", argv[i]);
-#endif
/*
* Look for the '-help' and similar options
*/
if (IS_OPTION("-help") || IS_OPTION("-h") || IS_OPTION("--help")) {
/* Reset logfile. We don't need that helpmessage in the logfile */
- g_pszLogFile = NULL;
+#ifdef _DEBUG
g_fNoHelpMessageBox = TRUE;
+#endif
UseMsg();
exit(0);
return 1;
@@ -272,7 +274,6 @@ ddxProcessArgument(int argc, char *argv[], int i)
if (IS_OPTION("-version") || IS_OPTION("--version")) {
/* Reset logfile. We don't need that versioninfo in the logfile */
- g_pszLogFile = NULL;
winLogVersionInfo();
exit(0);
return 1;
@@ -287,9 +288,7 @@ ddxProcessArgument(int argc, char *argv[], int i)
int iWidth, iHeight, iX, iY;
int iMonitor;
-#if CYGDEBUG
winDebug("ddxProcessArgument - screen - argc: %d i: %d\n", argc, i);
-#endif
/* Display the usage message if the argument is malformed */
if (i + 1 >= argc) {
@@ -324,9 +323,9 @@ ddxProcessArgument(int argc, char *argv[], int i)
("ddxProcessArgument - screen - Querying monitors failed\n");
}
else if (data.bMonitorSpecifiedExists == TRUE) {
- winErrorFVerb(2,
- "ddxProcessArgument - screen - Found Valid ``@Monitor'' = %d arg\n",
- iMonitor);
+ winDebug(
+ "ddxProcessArgument - screen - Found Valid ``@Monitor'' = %d arg\n",
+ iMonitor);
iArgsProcessed = 3;
g_ScreenInfo[nScreenNum].fUserGaveHeightAndWidth = FALSE;
g_ScreenInfo[nScreenNum].fUserGavePosition = TRUE;
@@ -354,8 +353,8 @@ ddxProcessArgument(int argc, char *argv[], int i)
else if (i + 2 < argc
&& 2 == sscanf(argv[i + 2], "%dx%d",
(int *) &iWidth, (int *) &iHeight)) {
- winErrorFVerb(2,
- "ddxProcessArgument - screen - Found ``WxD'' arg\n");
+ winDebug (
+ "ddxProcessArgument - screen - Found ``WxD'' arg\n");
iArgsProcessed = 3;
g_ScreenInfo[nScreenNum].fUserGaveHeightAndWidth = TRUE;
g_ScreenInfo[nScreenNum].dwWidth = iWidth;
@@ -365,8 +364,8 @@ ddxProcessArgument(int argc, char *argv[], int i)
/* Look for WxD+X+Y */
if (2 == sscanf(argv[i + 2], "%*dx%*d+%d+%d",
(int *) &iX, (int *) &iY)) {
- winErrorFVerb(2,
- "ddxProcessArgument - screen - Found ``X+Y'' arg\n");
+ winDebug (
+ "ddxProcessArgument - screen - Found ``X+Y'' arg\n");
g_ScreenInfo[nScreenNum].fUserGavePosition = TRUE;
g_ScreenInfo[nScreenNum].dwInitialX = iX;
g_ScreenInfo[nScreenNum].dwInitialY = iY;
@@ -410,9 +409,9 @@ ddxProcessArgument(int argc, char *argv[], int i)
("ddxProcessArgument - screen - Querying monitors failed\n");
}
else if (data.bMonitorSpecifiedExists == TRUE) {
- winErrorFVerb(2,
- "ddxProcessArgument - screen - Found Valid ``@Monitor'' = %d arg\n",
- iMonitor);
+ winDebug (
+ "ddxProcessArgument - screen - Found Valid ``@Monitor'' = %d arg\n",
+ iMonitor);
g_ScreenInfo[nScreenNum].fUserGavePosition = TRUE;
g_ScreenInfo[nScreenNum].iMonitor = iMonitor;
g_ScreenInfo[nScreenNum].hMonitor = data.monitorHandle;
@@ -433,7 +432,7 @@ ddxProcessArgument(int argc, char *argv[], int i)
}
else if (i + 3 < argc && 1 == sscanf(argv[i + 2], "%d", (int *) &iWidth)
&& 1 == sscanf(argv[i + 3], "%d", (int *) &iHeight)) {
- winErrorFVerb(2,
+ winDebug (
"ddxProcessArgument - screen - Found ``W D'' arg\n");
iArgsProcessed = 4;
g_ScreenInfo[nScreenNum].fUserGaveHeightAndWidth = TRUE;
@@ -443,7 +442,7 @@ ddxProcessArgument(int argc, char *argv[], int i)
g_ScreenInfo[nScreenNum].dwUserHeight = iHeight;
if (i + 5 < argc && 1 == sscanf(argv[i + 4], "%d", (int *) &iX)
&& 1 == sscanf(argv[i + 5], "%d", (int *) &iY)) {
- winErrorFVerb(2,
+ winDebug (
"ddxProcessArgument - screen - Found ``X Y'' arg\n");
iArgsProcessed = 6;
g_ScreenInfo[nScreenNum].fUserGavePosition = TRUE;
@@ -452,11 +451,11 @@ ddxProcessArgument(int argc, char *argv[], int i)
}
}
else {
- winErrorFVerb(2,
+ ErrorF (
"ddxProcessArgument - screen - Did not find size arg. "
- "dwWidth: %d dwHeight: %d\n",
- (int) g_ScreenInfo[nScreenNum].dwWidth,
- (int) g_ScreenInfo[nScreenNum].dwHeight);
+ "dwWidth: %d dwHeight: %d\n",
+ (int) g_ScreenInfo[nScreenNum].dwWidth,
+ (int) g_ScreenInfo[nScreenNum].dwHeight);
iArgsProcessed = 2;
g_ScreenInfo[nScreenNum].fUserGaveHeightAndWidth = FALSE;
}
@@ -533,6 +532,8 @@ ddxProcessArgument(int argc, char *argv[], int i)
screenInfoPtr->fMultipleMonitors = FALSE;
#endif
screenInfoPtr->fFullScreen = TRUE;
+ // resizing is not allowed in full screen so change the default to not allowed
+ screenInfoPtr->iResizeMode=notAllowed;
/* Indicate that we have processed this argument */
return 1;
@@ -574,6 +575,8 @@ ddxProcessArgument(int argc, char *argv[], int i)
/* Indicate that we have processed this argument */
return 1;
}
+#endif
+#ifdef XWIN_MULTIWINDOWINTWM
/*
* Look for the '-internalwm' argument
*/
@@ -716,6 +719,30 @@ ddxProcessArgument(int argc, char *argv[], int i)
/* Indicate that we have processed this argument */
return 1;
}
+
+ /*
+ * Look for the '-clipboard' argument
+ */
+ if (IS_OPTION ("-clipboardprimary"))
+ {
+ /* Now the default, we still accept the arg for backwards compatibility */
+ g_fClipboardPrimary = TRUE;
+
+ /* Indicate that we have processed this argument */
+ return 1;
+ }
+
+ /*
+ * Look for the '-noclipboard' argument
+ */
+ if (IS_OPTION ("-noclipboardprimary"))
+ {
+ g_fClipboardPrimary = FALSE;
+
+ /* Indicate that we have processed this argument */
+ return 1;
+ }
+
#endif
/*
@@ -1004,6 +1031,7 @@ ddxProcessArgument(int argc, char *argv[], int i)
if (IS_OPTION("-logverbose")) {
CHECK_ARGS(1);
g_iLogVerbose = atoi(argv[++i]);
+ LogSetParameter(XLOG_VERBOSITY, g_iLogVerbose);
return 2;
}
@@ -1069,10 +1097,27 @@ ddxProcessArgument(int argc, char *argv[], int i)
return 1;
}
- if (IS_OPTION("-nowgl")) {
+ else if (IS_OPTION("-nowgl")) {
g_fNativeGl = FALSE;
return 1;
}
+ else if (IS_OPTION("-swrastwgl"))
+ {
+ g_fswrastwgl = TRUE;
+ return 1;
+ }
+ else if (IS_OPTION("-parentprocessid"))
+ {
+ DWORD dwProcessId;
+ CHECK_ARGS (1);
+ dwProcessId = atoi(argv[++i]);
+ if (!AllowSetForegroundWindow(dwProcessId))
+ {
+ winMessageBoxF ("Error calling AllowSetForegroundWindow.", MB_ICONINFORMATION);
+ return 0;
+ }
+ return 2;
+ }
return 0;
}
@@ -1140,7 +1185,7 @@ winLogCommandLine(int argc, char *argv[])
iCurrLen += strlen(argv[i]);
}
- ErrorF("XWin was started with the following command line:\n\n"
+ winDebug ("XWin was started with the following command line:\n\n"
"%s\n\n", g_pszCommandLine);
}
@@ -1157,9 +1202,9 @@ winLogVersionInfo(void)
return;
s_fBeenHere = TRUE;
- ErrorF("Welcome to the XWin X Server\n");
+ ErrorF("Welcome to the VcXsrv X Server\n");
ErrorF("Vendor: %s\n", XVENDORNAME);
- ErrorF("Release: %d.%d.%d.%d\n", XORG_VERSION_MAJOR,
+ ErrorF("Release: %d.%d.%d.%d\n\n", XORG_VERSION_MAJOR,
XORG_VERSION_MINOR, XORG_VERSION_PATCH, XORG_VERSION_SNAP);
if (strlen(BUILDERSTRING))
ErrorF("%s\n", BUILDERSTRING);