hw/xwin: Detect invalid options in combination with -nodecoration

Detect invalid options in combination with -nodecoration

These are particularly problematic as -nodecoration implies a default of
-nomultimonitors, for some reason, which will gives rendering issues with
-multiwindow.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
Jon Turney 2015-07-08 19:12:22 +01:00
parent e1b983b55e
commit 504bf495f9

View File

@ -127,7 +127,7 @@ winValidateArgs(void)
return FALSE;
}
/* Check for -multiwindow, -mwextwm, or -rootless and fullscreen */
/* Check for -multiwindow, -mwextwm, or -rootless and -fullscreen */
if (g_ScreenInfo[i].fFullScreen && (FALSE
#ifdef XWIN_MULTIWINDOW
|| g_ScreenInfo[i].fMultiWindow
@ -142,6 +142,21 @@ winValidateArgs(void)
return FALSE;
}
/* Check for -multiwindow, -mwextwm, or -rootless and -nodecoration */
if (!g_ScreenInfo[i].fDecoration && (FALSE
#ifdef XWIN_MULTIWINDOW
|| g_ScreenInfo[i].fMultiWindow
#endif
#ifdef XWIN_MULTIWINDOWEXTWM
|| g_ScreenInfo[i].fMWExtWM
#endif
|| g_ScreenInfo[i].fRootless)
) {
ErrorF("winValidateArgs - -nodecoration is invalid with "
"-multiwindow, -mwextwm, or -rootless.\n");
return FALSE;
}
/* Check for !fullscreen and any fullscreen-only parameters */
if (!g_ScreenInfo[i].fFullScreen
&& (g_ScreenInfo[i].dwRefreshRate != WIN_DEFAULT_REFRESH