[PATCH 1/2] xwayland: Automatically load module if wayland support requested

Christopher James Halse Rogers christopher.halse.rogers at canonical.com
Wed May 23 05:05:53 PDT 2012


This makes life a bit easier for the drivers

Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers at canonical.com>
---
 hw/xfree86/common/xf86Config.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 7364a34..b916422 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -125,6 +125,7 @@ static ModuleDefault ModuleDefaults[] = {
 #ifdef DRI2
     {.name = "dri2",     .toLoad = TRUE,    .load_opt=NULL},
 #endif
+    {.name = "xwayland", .toLoad = FALSE,   .load_opt=NULL},
     {.name = NULL,       .toLoad = FALSE,   .load_opt=NULL}
 };
 
@@ -264,6 +265,17 @@ xf86ModulelistFromConfig(pointer **optlist)
         xf86Msg(X_ERROR, "Cannot access global config data structure\n");
         return NULL;
     }
+
+    /*
+     * Set the xwayland module to autoload if requested.
+     */
+    if (xorgWayland) {
+        for (i=0 ; ModuleDefaults[i].name != NULL ; i++) {
+            if (strcmp(ModuleDefaults[i].name, "xwayland") == 0) {
+                ModuleDefaults[i].toLoad = TRUE;
+            }
+        }
+    }
     
     if (xf86configptr->conf_modules) {
         /* Walk the disable list and let people know what we've parsed to
-- 
1.7.10



More information about the wayland-devel mailing list