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:
parent
8665cf3327
commit
8825d36a38
|
@ -1813,11 +1813,6 @@ configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen)
|
||||||
if (!servlayoutp)
|
if (!servlayoutp)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (conf_screen == NULL) {
|
|
||||||
xf86ConfigError("No Screen sections present\n");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* which screen section is the active one?
|
* which screen section is the active one?
|
||||||
*
|
*
|
||||||
|
@ -1905,6 +1900,12 @@ configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum,
|
||||||
XF86ConfAdaptorLinkPtr conf_adaptor;
|
XF86ConfAdaptorLinkPtr conf_adaptor;
|
||||||
Bool defaultMonitor = FALSE;
|
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,
|
xf86Msg(from, "|-->Screen \"%s\" (%d)\n", conf_screen->scrn_identifier,
|
||||||
scrnum);
|
scrnum);
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -82,8 +82,8 @@ xf86validateConfig (XF86ConfigPtr p)
|
||||||
{
|
{
|
||||||
/*if (!xf86validateDevice (p))
|
/*if (!xf86validateDevice (p))
|
||||||
return FALSE;*/
|
return FALSE;*/
|
||||||
if (!xf86validateScreen (p))
|
/*if (!xf86validateScreen (p))
|
||||||
return FALSE;
|
return FALSE;*/
|
||||||
if (!xf86validateInput (p))
|
if (!xf86validateInput (p))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xf86validateLayout (p))
|
if (!xf86validateLayout (p))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user