diff options
Diffstat (limited to 'xorg-server/hw/xwin/winprocarg.c')
-rwxr-xr-x[-rw-r--r--] | xorg-server/hw/xwin/winprocarg.c | 99 |
1 files changed, 60 insertions, 39 deletions
diff --git a/xorg-server/hw/xwin/winprocarg.c b/xorg-server/hw/xwin/winprocarg.c index e8cccb4c2..dd328ee80 100644..100755 --- a/xorg-server/hw/xwin/winprocarg.c +++ b/xorg-server/hw/xwin/winprocarg.c @@ -39,6 +39,7 @@ from The Open Group. #ifdef XWIN_CLIPBOARD #include "winclipboard/winclipboard.h" +extern Bool g_fClipboardPrimary; #endif /* @@ -79,9 +80,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) { @@ -91,17 +92,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; } } @@ -126,6 +127,8 @@ winInitializeScreenDefaults(void) defaultScreenInfo.fDecoration = TRUE; #ifdef XWIN_MULTIWINDOWEXTWM defaultScreenInfo.fMWExtWM = FALSE; +#endif +#ifdef XWIN_MULTIWINDOWINTWM defaultScreenInfo.fInternalWM = FALSE; #endif defaultScreenInfo.fRootless = FALSE; @@ -152,7 +155,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(); @@ -169,7 +172,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 */ @@ -243,23 +246,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; @@ -267,7 +269,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; @@ -282,9 +283,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) { @@ -319,9 +318,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; @@ -349,8 +348,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; @@ -360,8 +359,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; @@ -405,9 +404,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; @@ -428,7 +427,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; @@ -438,7 +437,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; @@ -447,11 +446,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; } @@ -528,6 +527,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; @@ -569,6 +570,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 */ @@ -1019,6 +1022,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; } @@ -1084,10 +1088,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; + } if (IS_OPTION("-hostintitle")) { g_fHostInTitle = TRUE; @@ -1160,7 +1181,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); } @@ -1177,9 +1198,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); |