From c1ac77e3438d434119bc55f794088bef0faff589 Mon Sep 17 00:00:00 2001 From: Darxus Date: Sat, 26 May 2012 23:50:12 -0600 Subject: Adapt to new initialisation sequence Signed-off-by: Corentin Chary --- src/wlshm.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/wlshm.c b/src/wlshm.c index 8f5cf8a..91c8099 100644 --- a/src/wlshm.c +++ b/src/wlshm.c @@ -601,16 +601,17 @@ wlshm_pre_init(ScrnInfoPtr pScrn, int flags) xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, wlshm->options); - if (xf86LoadSubModule(pScrn, "xwayland") == NULL) { - goto error; - } - - wlshm->xwl_screen = xwl_screen_pre_init(pScrn, 0, &xwl_driver); + wlshm->xwl_screen = xwl_screen_create(); if (!wlshm->xwl_screen) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to initialize xwayland.\n"); goto error; } + if (!xwl_screen_pre_init(pScrn, wlshm->xwl_screen, 0, &xwl_driver)) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to pre-init xwayland screen\n"); + xwl_screen_destroy(wlshm->xwl_screen); + } + /* Subtract memory for HW cursor */ xf86ValidateModesSize(pScrn, pScrn->monitor->Modes, pScrn->display->virtualX, -- cgit v1.2.3