[PATCH] xwayland: Adapt to new initialisation sequence

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


---
 src/intel_driver.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/intel_driver.c b/src/intel_driver.c
index e414406..7bf8b76 100644
--- a/src/intel_driver.c
+++ b/src/intel_driver.c
@@ -631,15 +631,18 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags)
 
 #ifdef XORG_WAYLAND
 	if (xorgWayland) {
-		xf86LoadSubModule(scrn, "xwayland");
-		intel->xwl_screen =
-			xwl_screen_pre_init(scrn, 0, &xwl_driver);
+		intel->xwl_screen = xwl_screen_create();
 		if (!intel->xwl_screen) {
 			xf86DrvMsg(scrn->scrnIndex, X_ERROR,
 				   "Failed to initialize xwayland.\n");
 			return FALSE;
 		}
-
+		if (!xwl_screen_pre_init(scrn, intel->xwl_screen, 
+					 0, &xwl_driver)) {
+			xf86DrvMsg(scrn->scrnIndex, X_ERROR,
+				   "Failed to pre-init xwayland screen\n");
+			xwl_screen_destroy(intel->xwl_screen);
+		}
 		intel->drmSubFD =
 			xwl_screen_get_drm_fd(intel->xwl_screen);
 	}
-- 
1.7.10



More information about the wayland-devel mailing list