xserver: Branch 'master'

David Nusinow gravity at kemper.freedesktop.org
Tue Oct 9 19:45:24 PDT 2007


 hw/xfree86/common/xf86Config.c |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

New commits:
diff-tree 8665cf3327b713f334b0483593a924c197f892f2 (from 37898b824fdc94735495e3494aa2b9a681d477b9)
Author: David Nusinow <dnusinow at debian.org>
Date:   Tue Oct 9 22:45:15 2007 -0400

    Don't require that the screen explicitly attach the device section
    
    This will allow the screen to not explicitly have a device section. If
    this is the case and there is a device section in the xorg.conf, the first
    one will be used. If there is no device section at all, a default one will
    be created that loads the automatically determined module.

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 1b99e95..9629df5 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1939,11 +1939,20 @@ configScreen(confScreenPtr screenp, XF86
 	if (!configMonitor(screenp->monitor,conf_screen->scrn_monitor))
 	    return FALSE;
     }
+    /* Configure the device. If there isn't one configured, attach to the
+     * first inactive one that we can configure. If there's none that work,
+     * set it to NULL so that the section can be autoconfigured later */
     screenp->device     = xnfcalloc(1, sizeof(GDevRec));
-    if (configDevice(screenp->device,conf_screen->scrn_device, TRUE))
+    if ((!conf_screen->scrn_device) && (xf86configptr->conf_device_lst)) {
+        conf_screen->scrn_device = xf86configptr->conf_device_lst;
+	xf86Msg(X_DEFAULT, "No device specified for screen \"%s\".\n"
+		"\tUsing the first device section listed.\n", screenp->id);
+    }
+    if (configDevice(screenp->device,conf_screen->scrn_device, TRUE)) {
         screenp->device->myScreenSection = screenp;
-    else
+    } else {
         screenp->device = NULL;
+    }
     screenp->options = conf_screen->scrn_option_lst;
     
     /*


More information about the xorg-commit mailing list