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
|
||||
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
|
||||
before any \fB\-screen\fP parameter. Screen specific parameters placed after
|
||||
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"
|
||||
The X server window takes the full screen, covering completely the
|
||||
\fIWindows\fP desktop.
|
||||
Currently \fB\-fullscreen\fP may only be applied to one X screen.
|
||||
.TP 8
|
||||
.B \-nodecoration
|
||||
Do not give the Cygwin/X window a \fIWindows\fP window border, title bar,
|
||||
|
|
|
@ -294,7 +294,8 @@ winCloseScreenPrimaryDD (int nIndex, ScreenPtr pScreen)
|
|||
|
||||
/* Call the wrapped CloseScreen procedure */
|
||||
WIN_UNWRAP(CloseScreen);
|
||||
fReturn = (*pScreen->CloseScreen) (nIndex, pScreen);
|
||||
if (pScreen->CloseScreen)
|
||||
fReturn = (*pScreen->CloseScreen) (nIndex, pScreen);
|
||||
|
||||
/* Delete the window property */
|
||||
RemoveProp (pScreenPriv->hwndScreen, WIN_SCR_PROP);
|
||||
|
|
|
@ -220,6 +220,10 @@ winScreenInit (int index,
|
|||
if (!((*pScreenPriv->pwinFinishScreenInit) (index, pScreen, argc, argv)))
|
||||
{
|
||||
ErrorF ("winScreenInit - winFinishScreenInit () failed\n");
|
||||
|
||||
/* call the engine dependent screen close procedure to clean up from a failure */
|
||||
pScreenPriv->pwinCloseScreen(index, pScreen);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -728,7 +728,8 @@ winCloseScreenShadowDD (int nIndex, ScreenPtr pScreen)
|
|||
|
||||
/* Call the wrapped CloseScreen procedure */
|
||||
WIN_UNWRAP(CloseScreen);
|
||||
fReturn = (*pScreen->CloseScreen) (nIndex, pScreen);
|
||||
if (pScreen->CloseScreen)
|
||||
fReturn = (*pScreen->CloseScreen) (nIndex, pScreen);
|
||||
|
||||
winFreeFBShadowDD(pScreen);
|
||||
|
||||
|
|
|
@ -802,7 +802,8 @@ winCloseScreenShadowDDNL (int nIndex, ScreenPtr pScreen)
|
|||
|
||||
/* Call the wrapped CloseScreen procedure */
|
||||
WIN_UNWRAP(CloseScreen);
|
||||
fReturn = (*pScreen->CloseScreen) (nIndex, pScreen);
|
||||
if (pScreen->CloseScreen)
|
||||
fReturn = (*pScreen->CloseScreen) (nIndex, pScreen);
|
||||
|
||||
winFreeFBShadowDDNL(pScreen);
|
||||
|
||||
|
|
|
@ -636,7 +636,8 @@ winCloseScreenShadowGDI (int nIndex, ScreenPtr pScreen)
|
|||
|
||||
/* Call the wrapped CloseScreen procedure */
|
||||
WIN_UNWRAP(CloseScreen);
|
||||
fReturn = (*pScreen->CloseScreen) (nIndex, pScreen);
|
||||
if (pScreen->CloseScreen)
|
||||
fReturn = (*pScreen->CloseScreen) (nIndex, pScreen);
|
||||
|
||||
/* Delete the window property */
|
||||
RemoveProp (pScreenPriv->hwndScreen, WIN_SCR_PROP);
|
||||
|
|
Loading…
Reference in New Issue