Cygwin/X: Handle failure during winScreenInit()
Handle failure during winScreenInit() a bit more cleanly, rather than crashing This avoids a crash with 'XWin -fullscreen -screen 0 @2 -screen 1 @1' Also document that fullscreen may only be applied to one screen. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
parent
ce6136f8c5
commit
4318e6a147
|
@ -67,7 +67,7 @@ The default behaviour is to create a single screen 0 that is roughly the
|
||||||
size of useful area of the primary monitor (allowing for any window
|
size of useful area of the primary monitor (allowing for any window
|
||||||
decorations and the task-bar).
|
decorations and the task-bar).
|
||||||
|
|
||||||
Screen specific parameters, such as \fB\-fullscreen\fP, can be applied as a
|
Screen specific parameters can be applied as a
|
||||||
default to all screens by placing those screen specific parameters
|
default to all screens by placing those screen specific parameters
|
||||||
before any \fB\-screen\fP parameter. Screen specific parameters placed after
|
before any \fB\-screen\fP parameter. Screen specific parameters placed after
|
||||||
the first \fB\-screen\fP parameter will apply only to the immediately
|
the first \fB\-screen\fP parameter will apply only to the immediately
|
||||||
|
@ -108,6 +108,7 @@ in \fB-multiwindow\fP or \fB-rootless\fP mode.
|
||||||
.B "\-fullscreen"
|
.B "\-fullscreen"
|
||||||
The X server window takes the full screen, covering completely the
|
The X server window takes the full screen, covering completely the
|
||||||
\fIWindows\fP desktop.
|
\fIWindows\fP desktop.
|
||||||
|
Currently \fB\-fullscreen\fP may only be applied to one X screen.
|
||||||
.TP 8
|
.TP 8
|
||||||
.B \-nodecoration
|
.B \-nodecoration
|
||||||
Do not give the Cygwin/X window a \fIWindows\fP window border, title bar,
|
Do not give the Cygwin/X window a \fIWindows\fP window border, title bar,
|
||||||
|
|
|
@ -294,6 +294,7 @@ winCloseScreenPrimaryDD (int nIndex, ScreenPtr pScreen)
|
||||||
|
|
||||||
/* Call the wrapped CloseScreen procedure */
|
/* Call the wrapped CloseScreen procedure */
|
||||||
WIN_UNWRAP(CloseScreen);
|
WIN_UNWRAP(CloseScreen);
|
||||||
|
if (pScreen->CloseScreen)
|
||||||
fReturn = (*pScreen->CloseScreen) (nIndex, pScreen);
|
fReturn = (*pScreen->CloseScreen) (nIndex, pScreen);
|
||||||
|
|
||||||
/* Delete the window property */
|
/* Delete the window property */
|
||||||
|
|
|
@ -220,6 +220,10 @@ winScreenInit (int index,
|
||||||
if (!((*pScreenPriv->pwinFinishScreenInit) (index, pScreen, argc, argv)))
|
if (!((*pScreenPriv->pwinFinishScreenInit) (index, pScreen, argc, argv)))
|
||||||
{
|
{
|
||||||
ErrorF ("winScreenInit - winFinishScreenInit () failed\n");
|
ErrorF ("winScreenInit - winFinishScreenInit () failed\n");
|
||||||
|
|
||||||
|
/* call the engine dependent screen close procedure to clean up from a failure */
|
||||||
|
pScreenPriv->pwinCloseScreen(index, pScreen);
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -728,6 +728,7 @@ winCloseScreenShadowDD (int nIndex, ScreenPtr pScreen)
|
||||||
|
|
||||||
/* Call the wrapped CloseScreen procedure */
|
/* Call the wrapped CloseScreen procedure */
|
||||||
WIN_UNWRAP(CloseScreen);
|
WIN_UNWRAP(CloseScreen);
|
||||||
|
if (pScreen->CloseScreen)
|
||||||
fReturn = (*pScreen->CloseScreen) (nIndex, pScreen);
|
fReturn = (*pScreen->CloseScreen) (nIndex, pScreen);
|
||||||
|
|
||||||
winFreeFBShadowDD(pScreen);
|
winFreeFBShadowDD(pScreen);
|
||||||
|
|
|
@ -802,6 +802,7 @@ winCloseScreenShadowDDNL (int nIndex, ScreenPtr pScreen)
|
||||||
|
|
||||||
/* Call the wrapped CloseScreen procedure */
|
/* Call the wrapped CloseScreen procedure */
|
||||||
WIN_UNWRAP(CloseScreen);
|
WIN_UNWRAP(CloseScreen);
|
||||||
|
if (pScreen->CloseScreen)
|
||||||
fReturn = (*pScreen->CloseScreen) (nIndex, pScreen);
|
fReturn = (*pScreen->CloseScreen) (nIndex, pScreen);
|
||||||
|
|
||||||
winFreeFBShadowDDNL(pScreen);
|
winFreeFBShadowDDNL(pScreen);
|
||||||
|
|
|
@ -636,6 +636,7 @@ winCloseScreenShadowGDI (int nIndex, ScreenPtr pScreen)
|
||||||
|
|
||||||
/* Call the wrapped CloseScreen procedure */
|
/* Call the wrapped CloseScreen procedure */
|
||||||
WIN_UNWRAP(CloseScreen);
|
WIN_UNWRAP(CloseScreen);
|
||||||
|
if (pScreen->CloseScreen)
|
||||||
fReturn = (*pScreen->CloseScreen) (nIndex, pScreen);
|
fReturn = (*pScreen->CloseScreen) (nIndex, pScreen);
|
||||||
|
|
||||||
/* Delete the window property */
|
/* Delete the window property */
|
||||||
|
|
Loading…
Reference in New Issue