Xwin: Simplify screen option processing
Use an instance of the XWin DDX-specific screen info structure to hold the current default values, to simplify greatly the code for applying options to all screens and remove all those loops over MAXSCREENS screens in the command line option processing Use g_iNumScreens for tracking the current initialized screen count Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
This commit is contained in:
parent
b61870595b
commit
d8454ae488
|
@ -65,7 +65,6 @@ typedef HRESULT (*SHGETFOLDERPATHPROC)(
|
||||||
|
|
||||||
extern int g_iNumScreens;
|
extern int g_iNumScreens;
|
||||||
extern winScreenInfo g_ScreenInfo[];
|
extern winScreenInfo g_ScreenInfo[];
|
||||||
extern int g_iLastScreen;
|
|
||||||
extern char * g_pszCommandLine;
|
extern char * g_pszCommandLine;
|
||||||
extern Bool g_fSilentFatalError;
|
extern Bool g_fSilentFatalError;
|
||||||
|
|
||||||
|
@ -115,9 +114,6 @@ void
|
||||||
OsVendorVErrorF (const char *pszFormat, va_list va_args);
|
OsVendorVErrorF (const char *pszFormat, va_list va_args);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
|
||||||
winInitializeDefaultScreens (void);
|
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
winCheckDisplayNumber (void);
|
winCheckDisplayNumber (void);
|
||||||
|
|
||||||
|
@ -716,22 +712,16 @@ OsVendorInit (void)
|
||||||
/* Add a default screen if no screens were specified */
|
/* Add a default screen if no screens were specified */
|
||||||
if (g_iNumScreens == 0)
|
if (g_iNumScreens == 0)
|
||||||
{
|
{
|
||||||
winDebug ("OsVendorInit - Creating bogus screen 0\n");
|
winDebug ("OsVendorInit - Creating default screen 0\n");
|
||||||
|
|
||||||
/*
|
|
||||||
* We need to initialize default screens if no arguments
|
|
||||||
* were processed. Otherwise, the default screens would
|
|
||||||
* already have been initialized by ddxProcessArgument ().
|
|
||||||
*/
|
|
||||||
winInitializeDefaultScreens ();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add a screen 0 using the defaults set by
|
* We need to initialize the default screen 0 if no -screen
|
||||||
* winInitializeDefaultScreens () and any additional parameters
|
* arguments were processed.
|
||||||
* processed by ddxProcessArgument ().
|
*
|
||||||
|
* Add a screen 0 using the defaults set by winInitializeDefaultScreens()
|
||||||
|
* and any additional default screen parameters given
|
||||||
*/
|
*/
|
||||||
g_iNumScreens = 1;
|
winInitializeScreens(1);
|
||||||
g_iLastScreen = 0;
|
|
||||||
|
|
||||||
/* We have to flag this as an explicit screen, even though it isn't */
|
/* We have to flag this as an explicit screen, even though it isn't */
|
||||||
g_ScreenInfo[0].fExplicitScreen = TRUE;
|
g_ScreenInfo[0].fExplicitScreen = TRUE;
|
||||||
|
|
|
@ -1450,6 +1450,12 @@ winWindowsWMExtensionInit (void);
|
||||||
Bool
|
Bool
|
||||||
winInitCursor (ScreenPtr pScreen);
|
winInitCursor (ScreenPtr pScreen);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* winprocarg.c
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
winInitializeScreens(int maxscreens);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* END DDX and DIX Function Prototypes
|
* END DDX and DIX Function Prototypes
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -42,7 +42,6 @@
|
||||||
|
|
||||||
int g_iNumScreens = 0;
|
int g_iNumScreens = 0;
|
||||||
winScreenInfo g_ScreenInfo[MAXSCREENS];
|
winScreenInfo g_ScreenInfo[MAXSCREENS];
|
||||||
int g_iLastScreen = -1;
|
|
||||||
#ifdef HAS_DEVWINDOWS
|
#ifdef HAS_DEVWINDOWS
|
||||||
int g_fdMessageQueue = WIN_FD_INVALID;
|
int g_fdMessageQueue = WIN_FD_INVALID;
|
||||||
#endif
|
#endif
|
||||||
|
@ -57,7 +56,6 @@ DevPrivateKey g_iPixmapPrivateKey = &g_iPixmapPrivateKeyIndex;
|
||||||
static int g_iWindowPrivateKeyIndex;
|
static int g_iWindowPrivateKeyIndex;
|
||||||
DevPrivateKey g_iWindowPrivateKey = &g_iWindowPrivateKeyIndex;
|
DevPrivateKey g_iWindowPrivateKey = &g_iWindowPrivateKeyIndex;
|
||||||
unsigned long g_ulServerGeneration = 0;
|
unsigned long g_ulServerGeneration = 0;
|
||||||
Bool g_fInitializedDefaultScreens = FALSE;
|
|
||||||
DWORD g_dwEnginesSupported = 0;
|
DWORD g_dwEnginesSupported = 0;
|
||||||
HINSTANCE g_hInstance = 0;
|
HINSTANCE g_hInstance = 0;
|
||||||
HWND g_hDlgDepthChange = NULL;
|
HWND g_hDlgDepthChange = NULL;
|
||||||
|
|
|
@ -46,8 +46,6 @@ from The Open Group.
|
||||||
|
|
||||||
extern int g_iNumScreens;
|
extern int g_iNumScreens;
|
||||||
extern winScreenInfo g_ScreenInfo[];
|
extern winScreenInfo g_ScreenInfo[];
|
||||||
extern int g_iLastScreen;
|
|
||||||
extern Bool g_fInitializedDefaultScreens;
|
|
||||||
#ifdef XWIN_CLIPBOARD
|
#ifdef XWIN_CLIPBOARD
|
||||||
extern Bool g_fUnicodeClipboard;
|
extern Bool g_fUnicodeClipboard;
|
||||||
extern Bool g_fClipboard;
|
extern Bool g_fClipboard;
|
||||||
|
@ -129,25 +127,25 @@ winLogVersionInfo (void);
|
||||||
void OsVendorVErrorF (const char *pszFormat, va_list va_args);
|
void OsVendorVErrorF (const char *pszFormat, va_list va_args);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
|
||||||
winInitializeDefaultScreens (void);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Process arguments on the command line
|
* Process arguments on the command line
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
static int iLastScreen = -1;
|
||||||
winInitializeDefaultScreens (void)
|
static winScreenInfo defaultScreenInfo;
|
||||||
{
|
|
||||||
int i;
|
|
||||||
DWORD dwWidth, dwHeight;
|
|
||||||
|
|
||||||
/* Bail out early if default screens have already been initialized */
|
static void
|
||||||
if (g_fInitializedDefaultScreens)
|
winInitializeScreenDefaults(void)
|
||||||
|
{
|
||||||
|
DWORD dwWidth, dwHeight;
|
||||||
|
static Bool fInitializedScreenDefaults = FALSE;
|
||||||
|
|
||||||
|
/* Bail out early if default screen has already been initialized */
|
||||||
|
if (fInitializedScreenDefaults)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Zero the memory used for storing the screen info */
|
/* Zero the memory used for storing the screen info */
|
||||||
ZeroMemory (g_ScreenInfo, MAXSCREENS * sizeof (winScreenInfo));
|
memset(&defaultScreenInfo, 0, sizeof(winScreenInfo));
|
||||||
|
|
||||||
/* Get default width and height */
|
/* Get default width and height */
|
||||||
/*
|
/*
|
||||||
|
@ -157,62 +155,85 @@ winInitializeDefaultScreens (void)
|
||||||
dwWidth = GetSystemMetrics (SM_CXSCREEN);
|
dwWidth = GetSystemMetrics (SM_CXSCREEN);
|
||||||
dwHeight = GetSystemMetrics (SM_CYSCREEN);
|
dwHeight = GetSystemMetrics (SM_CYSCREEN);
|
||||||
|
|
||||||
winErrorFVerb (2, "winInitializeDefaultScreens - w %d h %d\n",
|
winErrorFVerb (2, "winInitializeScreenDefaults - w %d h %d\n",
|
||||||
(int) dwWidth, (int) dwHeight);
|
(int) dwWidth, (int) dwHeight);
|
||||||
|
|
||||||
/* Set a default DPI, if no parameter was passed */
|
/* Set a default DPI, if no parameter was passed */
|
||||||
if (monitorResolution == 0)
|
if (monitorResolution == 0)
|
||||||
monitorResolution = WIN_DEFAULT_DPI;
|
monitorResolution = WIN_DEFAULT_DPI;
|
||||||
|
|
||||||
for (i = 0; i < MAXSCREENS; ++i)
|
defaultScreenInfo.dwWidth = dwWidth;
|
||||||
{
|
defaultScreenInfo.dwHeight = dwHeight;
|
||||||
g_ScreenInfo[i].dwScreen = i;
|
defaultScreenInfo.dwUserWidth = dwWidth;
|
||||||
g_ScreenInfo[i].dwWidth = dwWidth;
|
defaultScreenInfo.dwUserHeight = dwHeight;
|
||||||
g_ScreenInfo[i].dwHeight = dwHeight;
|
defaultScreenInfo.fUserGaveHeightAndWidth = WIN_DEFAULT_USER_GAVE_HEIGHT_AND_WIDTH;
|
||||||
g_ScreenInfo[i].dwUserWidth = dwWidth;
|
defaultScreenInfo.fUserGavePosition = FALSE;
|
||||||
g_ScreenInfo[i].dwUserHeight = dwHeight;
|
defaultScreenInfo.dwBPP = WIN_DEFAULT_BPP;
|
||||||
g_ScreenInfo[i].fUserGaveHeightAndWidth
|
defaultScreenInfo.dwClipUpdatesNBoxes = WIN_DEFAULT_CLIP_UPDATES_NBOXES;
|
||||||
= WIN_DEFAULT_USER_GAVE_HEIGHT_AND_WIDTH;
|
|
||||||
g_ScreenInfo[i].fUserGavePosition = FALSE;
|
|
||||||
g_ScreenInfo[i].dwBPP = WIN_DEFAULT_BPP;
|
|
||||||
g_ScreenInfo[i].dwClipUpdatesNBoxes = WIN_DEFAULT_CLIP_UPDATES_NBOXES;
|
|
||||||
#ifdef XWIN_EMULATEPSEUDO
|
#ifdef XWIN_EMULATEPSEUDO
|
||||||
g_ScreenInfo[i].fEmulatePseudo = WIN_DEFAULT_EMULATE_PSEUDO;
|
defaultScreenInfo.fEmulatePseudo = WIN_DEFAULT_EMULATE_PSEUDO;
|
||||||
#endif
|
#endif
|
||||||
g_ScreenInfo[i].dwRefreshRate = WIN_DEFAULT_REFRESH;
|
defaultScreenInfo.dwRefreshRate = WIN_DEFAULT_REFRESH;
|
||||||
g_ScreenInfo[i].pfb = NULL;
|
defaultScreenInfo.pfb = NULL;
|
||||||
g_ScreenInfo[i].fFullScreen = FALSE;
|
defaultScreenInfo.fFullScreen = FALSE;
|
||||||
g_ScreenInfo[i].fDecoration = TRUE;
|
defaultScreenInfo.fDecoration = TRUE;
|
||||||
#ifdef XWIN_MULTIWINDOWEXTWM
|
#ifdef XWIN_MULTIWINDOWEXTWM
|
||||||
g_ScreenInfo[i].fMWExtWM = FALSE;
|
defaultScreenInfo.fMWExtWM = FALSE;
|
||||||
g_ScreenInfo[i].fInternalWM = FALSE;
|
defaultScreenInfo.fInternalWM = FALSE;
|
||||||
#endif
|
#endif
|
||||||
g_ScreenInfo[i].fRootless = FALSE;
|
defaultScreenInfo.fRootless = FALSE;
|
||||||
#ifdef XWIN_MULTIWINDOW
|
#ifdef XWIN_MULTIWINDOW
|
||||||
g_ScreenInfo[i].fMultiWindow = FALSE;
|
defaultScreenInfo.fMultiWindow = FALSE;
|
||||||
#endif
|
#endif
|
||||||
#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
|
#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
|
||||||
g_ScreenInfo[i].fMultiMonitorOverride = FALSE;
|
defaultScreenInfo.fMultiMonitorOverride = FALSE;
|
||||||
#endif
|
#endif
|
||||||
g_ScreenInfo[i].fMultipleMonitors = FALSE;
|
defaultScreenInfo.fMultipleMonitors = FALSE;
|
||||||
g_ScreenInfo[i].fLessPointer = FALSE;
|
defaultScreenInfo.fLessPointer = FALSE;
|
||||||
g_ScreenInfo[i].fScrollbars = FALSE;
|
defaultScreenInfo.fScrollbars = FALSE;
|
||||||
g_ScreenInfo[i].fNoTrayIcon = FALSE;
|
defaultScreenInfo.fNoTrayIcon = FALSE;
|
||||||
g_ScreenInfo[i].iE3BTimeout = WIN_E3B_OFF;
|
defaultScreenInfo.iE3BTimeout = WIN_E3B_OFF;
|
||||||
g_ScreenInfo[i].dwWidth_mm = (dwWidth / WIN_DEFAULT_DPI)
|
defaultScreenInfo.dwWidth_mm = (dwWidth / WIN_DEFAULT_DPI) * 25.4;
|
||||||
* 25.4;
|
defaultScreenInfo.dwHeight_mm = (dwHeight / WIN_DEFAULT_DPI) * 25.4;
|
||||||
g_ScreenInfo[i].dwHeight_mm = (dwHeight / WIN_DEFAULT_DPI)
|
defaultScreenInfo.fUseWinKillKey = WIN_DEFAULT_WIN_KILL;
|
||||||
* 25.4;
|
defaultScreenInfo.fUseUnixKillKey = WIN_DEFAULT_UNIX_KILL;
|
||||||
g_ScreenInfo[i].fUseWinKillKey = WIN_DEFAULT_WIN_KILL;
|
defaultScreenInfo.fIgnoreInput = FALSE;
|
||||||
g_ScreenInfo[i].fUseUnixKillKey = WIN_DEFAULT_UNIX_KILL;
|
defaultScreenInfo.fExplicitScreen = FALSE;
|
||||||
g_ScreenInfo[i].fIgnoreInput = FALSE;
|
|
||||||
g_ScreenInfo[i].fExplicitScreen = FALSE;
|
/* Note that the default screen has been initialized */
|
||||||
|
fInitializedScreenDefaults = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
winInitializeScreen(int i)
|
||||||
|
{
|
||||||
|
winErrorFVerb (2, "winInitializeScreen - %d\n",i);
|
||||||
|
|
||||||
|
/* Initialize default screen values, if needed */
|
||||||
|
winInitializeScreenDefaults();
|
||||||
|
|
||||||
|
/* Copy the default screen info */
|
||||||
|
g_ScreenInfo[i] = defaultScreenInfo;
|
||||||
|
|
||||||
|
/* Set the screen number */
|
||||||
|
g_ScreenInfo[i].dwScreen = i;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
winInitializeScreens(int maxscreens)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
winErrorFVerb (2, "winInitializeScreens - %i\n", maxscreens);
|
||||||
|
|
||||||
|
if (maxscreens > g_iNumScreens)
|
||||||
|
{
|
||||||
|
/* Set default values for any new screens */
|
||||||
|
for (i = g_iNumScreens; i < maxscreens ; i++)
|
||||||
|
winInitializeScreen(i);
|
||||||
|
|
||||||
|
/* Keep a count of the number of screens */
|
||||||
|
g_iNumScreens = maxscreens;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Signal that the default screens have been initialized */
|
|
||||||
g_fInitializedDefaultScreens = TRUE;
|
|
||||||
|
|
||||||
winErrorFVerb (2, "winInitializeDefaultScreens - Returning\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* See Porting Layer Definition - p. 57 */
|
/* See Porting Layer Definition - p. 57 */
|
||||||
|
@ -244,6 +265,7 @@ int
|
||||||
ddxProcessArgument (int argc, char *argv[], int i)
|
ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
{
|
{
|
||||||
static Bool s_fBeenHere = FALSE;
|
static Bool s_fBeenHere = FALSE;
|
||||||
|
winScreenInfo *screenInfoPtr = NULL;
|
||||||
|
|
||||||
/* Initialize once */
|
/* Initialize once */
|
||||||
if (!s_fBeenHere)
|
if (!s_fBeenHere)
|
||||||
|
@ -276,7 +298,7 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
*/
|
*/
|
||||||
winErrorFVerb (2, "ddxProcessArgument - Initializing default "
|
winErrorFVerb (2, "ddxProcessArgument - Initializing default "
|
||||||
"screens\n");
|
"screens\n");
|
||||||
winInitializeDefaultScreens ();
|
winInitializeScreenDefaults();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -339,6 +361,14 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Initialize default values for any new screens
|
||||||
|
|
||||||
|
Note that default values can't change after a -screen option is
|
||||||
|
seen, so it's safe to do this for each screen as it is introduced
|
||||||
|
*/
|
||||||
|
winInitializeScreens(nScreenNum+1);
|
||||||
|
|
||||||
/* look for @m where m is monitor number */
|
/* look for @m where m is monitor number */
|
||||||
if (i + 2 < argc
|
if (i + 2 < argc
|
||||||
&& 1 == sscanf(argv[i + 2], "@%d", (int *) &iMonitor))
|
&& 1 == sscanf(argv[i + 2], "@%d", (int *) &iMonitor))
|
||||||
|
@ -505,14 +535,33 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
* before a screen number apply to all screens, whereas parameters
|
* before a screen number apply to all screens, whereas parameters
|
||||||
* seen after a screen number apply to that screen number only.
|
* seen after a screen number apply to that screen number only.
|
||||||
*/
|
*/
|
||||||
g_iLastScreen = nScreenNum;
|
iLastScreen = nScreenNum;
|
||||||
|
|
||||||
/* Keep a count of the number of screens */
|
|
||||||
++g_iNumScreens;
|
|
||||||
|
|
||||||
return iArgsProcessed;
|
return iArgsProcessed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Is this parameter attached to a screen or global?
|
||||||
|
*
|
||||||
|
* If the parameter is for all screens (appears before
|
||||||
|
* any -screen option), store it in the default screen
|
||||||
|
* info
|
||||||
|
*
|
||||||
|
* If the parameter is for a single screen (appears
|
||||||
|
* after a -screen option), store it in the screen info
|
||||||
|
* for that screen
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
if (iLastScreen == -1)
|
||||||
|
{
|
||||||
|
screenInfoPtr = &defaultScreenInfo;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
screenInfoPtr = &(g_ScreenInfo[iLastScreen]);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Look for the '-engine n' argument
|
* Look for the '-engine n' argument
|
||||||
*/
|
*/
|
||||||
|
@ -541,22 +590,7 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Is this parameter attached to a screen or global? */
|
screenInfoPtr->dwEnginePreferred = dwEngine;
|
||||||
if (-1 == g_iLastScreen)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
|
|
||||||
/* Parameter is for all screens */
|
|
||||||
for (j = 0; j < MAXSCREENS; j++)
|
|
||||||
{
|
|
||||||
g_ScreenInfo[j].dwEnginePreferred = dwEngine;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Parameter is for a single screen */
|
|
||||||
g_ScreenInfo[g_iLastScreen].dwEnginePreferred = dwEngine;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Indicate that we have processed the argument */
|
/* Indicate that we have processed the argument */
|
||||||
return 2;
|
return 2;
|
||||||
|
@ -567,30 +601,11 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
*/
|
*/
|
||||||
if (IS_OPTION ("-fullscreen"))
|
if (IS_OPTION ("-fullscreen"))
|
||||||
{
|
{
|
||||||
/* Is this parameter attached to a screen or is it global? */
|
|
||||||
if (-1 == g_iLastScreen)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
|
|
||||||
/* Parameter is for all screens */
|
|
||||||
for (j = 0; j < MAXSCREENS; j++)
|
|
||||||
{
|
|
||||||
#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
|
#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
|
||||||
if (!g_ScreenInfo[j].fMultiMonitorOverride)
|
if (!screenInfoPtr->fMultiMonitorOverride)
|
||||||
g_ScreenInfo[j].fMultipleMonitors = FALSE;
|
screenInfoPtr->fMultipleMonitors = FALSE;
|
||||||
#endif
|
#endif
|
||||||
g_ScreenInfo[j].fFullScreen = TRUE;
|
screenInfoPtr->fFullScreen = TRUE;
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Parameter is for a single screen */
|
|
||||||
#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
|
|
||||||
if (!g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride)
|
|
||||||
g_ScreenInfo[g_iLastScreen].fMultipleMonitors = FALSE;
|
|
||||||
#endif
|
|
||||||
g_ScreenInfo[g_iLastScreen].fFullScreen = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Indicate that we have processed this argument */
|
/* Indicate that we have processed this argument */
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -601,22 +616,7 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
*/
|
*/
|
||||||
if (IS_OPTION ("-lesspointer"))
|
if (IS_OPTION ("-lesspointer"))
|
||||||
{
|
{
|
||||||
/* Is this parameter attached to a screen or is it global? */
|
screenInfoPtr->fLessPointer = TRUE;
|
||||||
if (-1 == g_iLastScreen)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
|
|
||||||
/* Parameter is for all screens */
|
|
||||||
for (j = 0; j < MAXSCREENS; j++)
|
|
||||||
{
|
|
||||||
g_ScreenInfo[j].fLessPointer = TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Parameter is for a single screen */
|
|
||||||
g_ScreenInfo[g_iLastScreen].fLessPointer = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Indicate that we have processed this argument */
|
/* Indicate that we have processed this argument */
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -627,30 +627,11 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
*/
|
*/
|
||||||
if (IS_OPTION ("-nodecoration"))
|
if (IS_OPTION ("-nodecoration"))
|
||||||
{
|
{
|
||||||
/* Is this parameter attached to a screen or is it global? */
|
|
||||||
if (-1 == g_iLastScreen)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
|
|
||||||
/* Parameter is for all screens */
|
|
||||||
for (j = 0; j < MAXSCREENS; j++)
|
|
||||||
{
|
|
||||||
#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
|
#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
|
||||||
if (!g_ScreenInfo[j].fMultiMonitorOverride)
|
if (!screenInfoPtr->fMultiMonitorOverride)
|
||||||
g_ScreenInfo[j].fMultipleMonitors = FALSE;
|
screenInfoPtr->fMultipleMonitors = FALSE;
|
||||||
#endif
|
#endif
|
||||||
g_ScreenInfo[j].fDecoration = FALSE;
|
screenInfoPtr->fDecoration = FALSE;
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Parameter is for a single screen */
|
|
||||||
#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
|
|
||||||
if (!g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride)
|
|
||||||
g_ScreenInfo[g_iLastScreen].fMultipleMonitors = FALSE;
|
|
||||||
#endif
|
|
||||||
g_ScreenInfo[g_iLastScreen].fDecoration = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Indicate that we have processed this argument */
|
/* Indicate that we have processed this argument */
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -662,26 +643,9 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
*/
|
*/
|
||||||
if (IS_OPTION ("-mwextwm"))
|
if (IS_OPTION ("-mwextwm"))
|
||||||
{
|
{
|
||||||
/* Is this parameter attached to a screen or is it global? */
|
if (!screenInfoPtr->fMultiMonitorOverride)
|
||||||
if (-1 == g_iLastScreen)
|
screenInfoPtr->fMultipleMonitors = TRUE;
|
||||||
{
|
screenInfoPtr->fMWExtWM = TRUE;
|
||||||
int j;
|
|
||||||
|
|
||||||
/* Parameter is for all screens */
|
|
||||||
for (j = 0; j < MAXSCREENS; j++)
|
|
||||||
{
|
|
||||||
if (!g_ScreenInfo[j].fMultiMonitorOverride)
|
|
||||||
g_ScreenInfo[j].fMultipleMonitors = TRUE;
|
|
||||||
g_ScreenInfo[j].fMWExtWM = TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Parameter is for a single screen */
|
|
||||||
if (!g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride)
|
|
||||||
g_ScreenInfo[g_iLastScreen].fMultipleMonitors = TRUE;
|
|
||||||
g_ScreenInfo[g_iLastScreen].fMWExtWM = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Indicate that we have processed this argument */
|
/* Indicate that we have processed this argument */
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -691,28 +655,10 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
*/
|
*/
|
||||||
if (IS_OPTION ("-internalwm"))
|
if (IS_OPTION ("-internalwm"))
|
||||||
{
|
{
|
||||||
/* Is this parameter attached to a screen or is it global? */
|
if (!screenInfoPtr->fMultiMonitorOverride)
|
||||||
if (-1 == g_iLastScreen)
|
screenInfoPtr->fMultipleMonitors = TRUE;
|
||||||
{
|
screenInfoPtr->fMWExtWM = TRUE;
|
||||||
int j;
|
screenInfoPtr->fInternalWM = TRUE;
|
||||||
|
|
||||||
/* Parameter is for all screens */
|
|
||||||
for (j = 0; j < MAXSCREENS; j++)
|
|
||||||
{
|
|
||||||
if (!g_ScreenInfo[j].fMultiMonitorOverride)
|
|
||||||
g_ScreenInfo[j].fMultipleMonitors = TRUE;
|
|
||||||
g_ScreenInfo[j].fMWExtWM = TRUE;
|
|
||||||
g_ScreenInfo[j].fInternalWM = TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Parameter is for a single screen */
|
|
||||||
if (!g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride)
|
|
||||||
g_ScreenInfo[g_iLastScreen].fMultipleMonitors = TRUE;
|
|
||||||
g_ScreenInfo[g_iLastScreen].fMWExtWM = TRUE;
|
|
||||||
g_ScreenInfo[g_iLastScreen].fInternalWM = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Indicate that we have processed this argument */
|
/* Indicate that we have processed this argument */
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -724,30 +670,11 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
*/
|
*/
|
||||||
if (IS_OPTION ("-rootless"))
|
if (IS_OPTION ("-rootless"))
|
||||||
{
|
{
|
||||||
/* Is this parameter attached to a screen or is it global? */
|
|
||||||
if (-1 == g_iLastScreen)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
|
|
||||||
/* Parameter is for all screens */
|
|
||||||
for (j = 0; j < MAXSCREENS; j++)
|
|
||||||
{
|
|
||||||
#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
|
#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
|
||||||
if (!g_ScreenInfo[j].fMultiMonitorOverride)
|
if (!screenInfoPtr->fMultiMonitorOverride)
|
||||||
g_ScreenInfo[j].fMultipleMonitors = FALSE;
|
screenInfoPtr->fMultipleMonitors = FALSE;
|
||||||
#endif
|
#endif
|
||||||
g_ScreenInfo[j].fRootless = TRUE;
|
screenInfoPtr->fRootless = TRUE;
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Parameter is for a single screen */
|
|
||||||
#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
|
|
||||||
if (!g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride)
|
|
||||||
g_ScreenInfo[g_iLastScreen].fMultipleMonitors = FALSE;
|
|
||||||
#endif
|
|
||||||
g_ScreenInfo[g_iLastScreen].fRootless = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Indicate that we have processed this argument */
|
/* Indicate that we have processed this argument */
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -759,30 +686,11 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
*/
|
*/
|
||||||
if (IS_OPTION ("-multiwindow"))
|
if (IS_OPTION ("-multiwindow"))
|
||||||
{
|
{
|
||||||
/* Is this parameter attached to a screen or is it global? */
|
|
||||||
if (-1 == g_iLastScreen)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
|
|
||||||
/* Parameter is for all screens */
|
|
||||||
for (j = 0; j < MAXSCREENS; j++)
|
|
||||||
{
|
|
||||||
#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
|
#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
|
||||||
if (!g_ScreenInfo[j].fMultiMonitorOverride)
|
if (!screenInfoPtr->fMultiMonitorOverride)
|
||||||
g_ScreenInfo[j].fMultipleMonitors = TRUE;
|
screenInfoPtr->fMultipleMonitors = TRUE;
|
||||||
#endif
|
#endif
|
||||||
g_ScreenInfo[j].fMultiWindow = TRUE;
|
screenInfoPtr->fMultiWindow = TRUE;
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Parameter is for a single screen */
|
|
||||||
#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
|
|
||||||
if (!g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride)
|
|
||||||
g_ScreenInfo[g_iLastScreen].fMultipleMonitors = TRUE;
|
|
||||||
#endif
|
|
||||||
g_ScreenInfo[g_iLastScreen].fMultiWindow = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Indicate that we have processed this argument */
|
/* Indicate that we have processed this argument */
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -795,28 +703,10 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
if (IS_OPTION ("-multiplemonitors")
|
if (IS_OPTION ("-multiplemonitors")
|
||||||
|| IS_OPTION ("-multimonitors"))
|
|| IS_OPTION ("-multimonitors"))
|
||||||
{
|
{
|
||||||
/* Is this parameter attached to a screen or is it global? */
|
|
||||||
if (-1 == g_iLastScreen)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
|
|
||||||
/* Parameter is for all screens */
|
|
||||||
for (j = 0; j < MAXSCREENS; j++)
|
|
||||||
{
|
|
||||||
#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
|
#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
|
||||||
g_ScreenInfo[j].fMultiMonitorOverride = TRUE;
|
screenInfoPtr->fMultiMonitorOverride = TRUE;
|
||||||
#endif
|
#endif
|
||||||
g_ScreenInfo[j].fMultipleMonitors = TRUE;
|
screenInfoPtr->fMultipleMonitors = TRUE;
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Parameter is for a single screen */
|
|
||||||
#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
|
|
||||||
g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride = TRUE;
|
|
||||||
#endif
|
|
||||||
g_ScreenInfo[g_iLastScreen].fMultipleMonitors = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Indicate that we have processed this argument */
|
/* Indicate that we have processed this argument */
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -828,28 +718,10 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
if (IS_OPTION ("-nomultiplemonitors")
|
if (IS_OPTION ("-nomultiplemonitors")
|
||||||
|| IS_OPTION ("-nomultimonitors"))
|
|| IS_OPTION ("-nomultimonitors"))
|
||||||
{
|
{
|
||||||
/* Is this parameter attached to a screen or is it global? */
|
|
||||||
if (-1 == g_iLastScreen)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
|
|
||||||
/* Parameter is for all screens */
|
|
||||||
for (j = 0; j < MAXSCREENS; j++)
|
|
||||||
{
|
|
||||||
#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
|
#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
|
||||||
g_ScreenInfo[j].fMultiMonitorOverride = TRUE;
|
screenInfoPtr->fMultiMonitorOverride = TRUE;
|
||||||
#endif
|
#endif
|
||||||
g_ScreenInfo[j].fMultipleMonitors = FALSE;
|
screenInfoPtr->fMultipleMonitors = FALSE;
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Parameter is for a single screen */
|
|
||||||
#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
|
|
||||||
g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride = TRUE;
|
|
||||||
#endif
|
|
||||||
g_ScreenInfo[g_iLastScreen].fMultipleMonitors = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Indicate that we have processed this argument */
|
/* Indicate that we have processed this argument */
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -861,22 +733,7 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
*/
|
*/
|
||||||
if (IS_OPTION ("-scrollbars"))
|
if (IS_OPTION ("-scrollbars"))
|
||||||
{
|
{
|
||||||
/* Is this parameter attached to a screen or is it global? */
|
screenInfoPtr->fScrollbars = TRUE;
|
||||||
if (-1 == g_iLastScreen)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
|
|
||||||
/* Parameter is for all screens */
|
|
||||||
for (j = 0; j < MAXSCREENS; j++)
|
|
||||||
{
|
|
||||||
g_ScreenInfo[j].fScrollbars = TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Parameter is for a single screen */
|
|
||||||
g_ScreenInfo[g_iLastScreen].fScrollbars = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Indicate that we have processed this argument */
|
/* Indicate that we have processed this argument */
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -914,22 +771,7 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
*/
|
*/
|
||||||
if (IS_OPTION ("-ignoreinput"))
|
if (IS_OPTION ("-ignoreinput"))
|
||||||
{
|
{
|
||||||
/* Is this parameter attached to a screen or is it global? */
|
screenInfoPtr->fIgnoreInput = TRUE;
|
||||||
if (-1 == g_iLastScreen)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
|
|
||||||
/* Parameter is for all screens */
|
|
||||||
for (j = 0; j < MAXSCREENS; j++)
|
|
||||||
{
|
|
||||||
g_ScreenInfo[j].fIgnoreInput = TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Parameter is for a single screen */
|
|
||||||
g_ScreenInfo[g_iLastScreen].fIgnoreInput = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Indicate that we have processed this argument */
|
/* Indicate that we have processed this argument */
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -962,22 +804,7 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
iE3BTimeout = WIN_DEFAULT_E3B_TIME;
|
iE3BTimeout = WIN_DEFAULT_E3B_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Is this parameter attached to a screen or is it global? */
|
screenInfoPtr->iE3BTimeout = iE3BTimeout;
|
||||||
if (-1 == g_iLastScreen)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
|
|
||||||
/* Parameter is for all screens */
|
|
||||||
for (j = 0; j < MAXSCREENS; j++)
|
|
||||||
{
|
|
||||||
g_ScreenInfo[j].iE3BTimeout = iE3BTimeout;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Parameter is for a single screen */
|
|
||||||
g_ScreenInfo[g_iLastScreen].iE3BTimeout = iE3BTimeout;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Indicate that we have processed this argument */
|
/* Indicate that we have processed this argument */
|
||||||
return iArgsProcessed;
|
return iArgsProcessed;
|
||||||
|
@ -1000,23 +827,8 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
/* Grab the argument */
|
/* Grab the argument */
|
||||||
dwBPP = atoi (argv[i]);
|
dwBPP = atoi (argv[i]);
|
||||||
|
|
||||||
/* Is this parameter attached to a screen or global? */
|
screenInfoPtr->dwBPP = dwBPP;
|
||||||
if (-1 == g_iLastScreen)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
|
|
||||||
/* Parameter is for all screens */
|
|
||||||
for (j = 0; j < MAXSCREENS; j++)
|
|
||||||
{
|
|
||||||
g_ScreenInfo[j].dwBPP = dwBPP;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Parameter is for a single screen */
|
|
||||||
g_ScreenInfo[g_iLastScreen].dwBPP = dwBPP;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Indicate that we have processed the argument */
|
/* Indicate that we have processed the argument */
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
@ -1038,23 +850,8 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
/* Grab the argument */
|
/* Grab the argument */
|
||||||
dwRefreshRate = atoi (argv[i]);
|
dwRefreshRate = atoi (argv[i]);
|
||||||
|
|
||||||
/* Is this parameter attached to a screen or global? */
|
screenInfoPtr->dwRefreshRate = dwRefreshRate;
|
||||||
if (-1 == g_iLastScreen)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
|
|
||||||
/* Parameter is for all screens */
|
|
||||||
for (j = 0; j < MAXSCREENS; j++)
|
|
||||||
{
|
|
||||||
g_ScreenInfo[j].dwRefreshRate = dwRefreshRate;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Parameter is for a single screen */
|
|
||||||
g_ScreenInfo[g_iLastScreen].dwRefreshRate = dwRefreshRate;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Indicate that we have processed the argument */
|
/* Indicate that we have processed the argument */
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
@ -1076,23 +873,8 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
/* Grab the argument */
|
/* Grab the argument */
|
||||||
dwNumBoxes = atoi (argv[i]);
|
dwNumBoxes = atoi (argv[i]);
|
||||||
|
|
||||||
/* Is this parameter attached to a screen or global? */
|
screenInfoPtr->dwClipUpdatesNBoxes = dwNumBoxes;
|
||||||
if (-1 == g_iLastScreen)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
|
|
||||||
/* Parameter is for all screens */
|
|
||||||
for (j = 0; j < MAXSCREENS; j++)
|
|
||||||
{
|
|
||||||
g_ScreenInfo[j].dwClipUpdatesNBoxes = dwNumBoxes;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Parameter is for a single screen */
|
|
||||||
g_ScreenInfo[g_iLastScreen].dwClipUpdatesNBoxes = dwNumBoxes;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Indicate that we have processed the argument */
|
/* Indicate that we have processed the argument */
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
@ -1103,22 +885,7 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
*/
|
*/
|
||||||
if (IS_OPTION ("-emulatepseudo"))
|
if (IS_OPTION ("-emulatepseudo"))
|
||||||
{
|
{
|
||||||
/* Is this parameter attached to a screen or is it global? */
|
screenInfoPtr->fEmulatePseudo = TRUE;
|
||||||
if (-1 == g_iLastScreen)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
|
|
||||||
/* Parameter is for all screens */
|
|
||||||
for (j = 0; j < MAXSCREENS; j++)
|
|
||||||
{
|
|
||||||
g_ScreenInfo[j].fEmulatePseudo = TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Parameter is for a single screen */
|
|
||||||
g_ScreenInfo[g_iLastScreen].fEmulatePseudo = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Indicate that we have processed this argument */
|
/* Indicate that we have processed this argument */
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1130,22 +897,7 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
*/
|
*/
|
||||||
if (IS_OPTION ("-nowinkill"))
|
if (IS_OPTION ("-nowinkill"))
|
||||||
{
|
{
|
||||||
/* Is this parameter attached to a screen or is it global? */
|
screenInfoPtr->fUseWinKillKey = FALSE;
|
||||||
if (-1 == g_iLastScreen)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
|
|
||||||
/* Parameter is for all screens */
|
|
||||||
for (j = 0; j < MAXSCREENS; j++)
|
|
||||||
{
|
|
||||||
g_ScreenInfo[j].fUseWinKillKey = FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Parameter is for a single screen */
|
|
||||||
g_ScreenInfo[g_iLastScreen].fUseWinKillKey = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Indicate that we have processed this argument */
|
/* Indicate that we have processed this argument */
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1156,22 +908,7 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
*/
|
*/
|
||||||
if (IS_OPTION ("-winkill"))
|
if (IS_OPTION ("-winkill"))
|
||||||
{
|
{
|
||||||
/* Is this parameter attached to a screen or is it global? */
|
screenInfoPtr->fUseWinKillKey = TRUE;
|
||||||
if (-1 == g_iLastScreen)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
|
|
||||||
/* Parameter is for all screens */
|
|
||||||
for (j = 0; j < MAXSCREENS; j++)
|
|
||||||
{
|
|
||||||
g_ScreenInfo[j].fUseWinKillKey = TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Parameter is for a single screen */
|
|
||||||
g_ScreenInfo[g_iLastScreen].fUseWinKillKey = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Indicate that we have processed this argument */
|
/* Indicate that we have processed this argument */
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1182,22 +919,7 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
*/
|
*/
|
||||||
if (IS_OPTION ("-nounixkill"))
|
if (IS_OPTION ("-nounixkill"))
|
||||||
{
|
{
|
||||||
/* Is this parameter attached to a screen or is it global? */
|
screenInfoPtr->fUseUnixKillKey = FALSE;
|
||||||
if (-1 == g_iLastScreen)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
|
|
||||||
/* Parameter is for all screens */
|
|
||||||
for (j = 0; j < MAXSCREENS; j++)
|
|
||||||
{
|
|
||||||
g_ScreenInfo[j].fUseUnixKillKey = FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Parameter is for a single screen */
|
|
||||||
g_ScreenInfo[g_iLastScreen].fUseUnixKillKey = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Indicate that we have processed this argument */
|
/* Indicate that we have processed this argument */
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1208,22 +930,7 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
*/
|
*/
|
||||||
if (IS_OPTION ("-unixkill"))
|
if (IS_OPTION ("-unixkill"))
|
||||||
{
|
{
|
||||||
/* Is this parameter attached to a screen or is it global? */
|
screenInfoPtr->fUseUnixKillKey = TRUE;
|
||||||
if (-1 == g_iLastScreen)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
|
|
||||||
/* Parameter is for all screens */
|
|
||||||
for (j = 0; j < MAXSCREENS; j++)
|
|
||||||
{
|
|
||||||
g_ScreenInfo[j].fUseUnixKillKey = TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Parameter is for a single screen */
|
|
||||||
g_ScreenInfo[g_iLastScreen].fUseUnixKillKey = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Indicate that we have processed this argument */
|
/* Indicate that we have processed this argument */
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1234,22 +941,7 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
*/
|
*/
|
||||||
if (IS_OPTION ("-notrayicon"))
|
if (IS_OPTION ("-notrayicon"))
|
||||||
{
|
{
|
||||||
/* Is this parameter attached to a screen or is it global? */
|
screenInfoPtr->fNoTrayIcon = TRUE;
|
||||||
if (-1 == g_iLastScreen)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
|
|
||||||
/* Parameter is for all screens */
|
|
||||||
for (j = 0; j < MAXSCREENS; j++)
|
|
||||||
{
|
|
||||||
g_ScreenInfo[j].fNoTrayIcon = TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Parameter is for a single screen */
|
|
||||||
g_ScreenInfo[g_iLastScreen].fNoTrayIcon = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Indicate that we have processed this argument */
|
/* Indicate that we have processed this argument */
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1260,22 +952,7 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
*/
|
*/
|
||||||
if (IS_OPTION ("-trayicon"))
|
if (IS_OPTION ("-trayicon"))
|
||||||
{
|
{
|
||||||
/* Is this parameter attached to a screen or is it global? */
|
screenInfoPtr->fNoTrayIcon = FALSE;
|
||||||
if (-1 == g_iLastScreen)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
|
|
||||||
/* Parameter is for all screens */
|
|
||||||
for (j = 0; j < MAXSCREENS; j++)
|
|
||||||
{
|
|
||||||
g_ScreenInfo[j].fNoTrayIcon = FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Parameter is for a single screen */
|
|
||||||
g_ScreenInfo[g_iLastScreen].fNoTrayIcon = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Indicate that we have processed this argument */
|
/* Indicate that we have processed this argument */
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -196,7 +196,7 @@ winScreenInit (int index,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* In this case, some of the defaults set in
|
* In this case, some of the defaults set in
|
||||||
* winInitializeDefaultScreens () are not correct ...
|
* winInitializeScreenDefaults() are not correct ...
|
||||||
*/
|
*/
|
||||||
if (!pScreenInfo->fUserGaveHeightAndWidth)
|
if (!pScreenInfo->fUserGaveHeightAndWidth)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user