Allow the user to not have a screen section

If none is present, a default one will be created. This will be attached
to either the first device section in the xorg.conf (allowing you to
specify something like using EXA without having a screen section) or a
default screen section if none is present in the file.
This commit is contained in:
David Nusinow 2007-10-09 22:49:07 -04:00
parent 8665cf3327
commit 8825d36a38
2 changed files with 8 additions and 7 deletions

View File

@ -1813,11 +1813,6 @@ configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen)
if (!servlayoutp)
return FALSE;
if (conf_screen == NULL) {
xf86ConfigError("No Screen sections present\n");
return FALSE;
}
/*
* which screen section is the active one?
*
@ -1905,6 +1900,12 @@ configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum,
XF86ConfAdaptorLinkPtr conf_adaptor;
Bool defaultMonitor = FALSE;
if (!conf_screen) {
conf_screen = xnfcalloc(1, sizeof(XF86ConfScreenRec));
conf_screen->scrn_identifier = "Default Screen Section";
xf86Msg(X_DEFAULT, "No screen section available. Using defaults.\n");
}
xf86Msg(from, "|-->Screen \"%s\" (%d)\n", conf_screen->scrn_identifier,
scrnum);
/*

View File

@ -82,8 +82,8 @@ xf86validateConfig (XF86ConfigPtr p)
{
/*if (!xf86validateDevice (p))
return FALSE;*/
if (!xf86validateScreen (p))
return FALSE;
/*if (!xf86validateScreen (p))
return FALSE;*/
if (!xf86validateInput (p))
return FALSE;
if (!xf86validateLayout (p))