diff options
Diffstat (limited to 'hw/xfree86/common/xf86Init.c')
-rw-r--r-- | hw/xfree86/common/xf86Init.c | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index bf577e6ad..d12b6bd6a 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -139,8 +139,8 @@ xf86CreateRootWindow(WindowPtr pWin) int err = Success; ScreenPtr pScreen = pWin->drawable.pScreen; RootWinPropPtr pProp; - CreateWindowProcPtr CreateWindow = - (CreateWindowProcPtr)(pScreen->devPrivates[xf86CreateRootWindowIndex].ptr); + CreateWindowProcPtr CreateWindow = (CreateWindowProcPtr) + dixLookupPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey); #ifdef DEBUG ErrorF("xf86CreateRootWindow(%p)\n", pWin); @@ -156,7 +156,7 @@ xf86CreateRootWindow(WindowPtr pWin) /* Unhook this function ... */ pScreen->CreateWindow = CreateWindow; - pScreen->devPrivates[xf86CreateRootWindowIndex].ptr = NULL; + dixSetPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey, NULL); /* ... and call the previous CreateWindow fuction, if any */ if (NULL!=pScreen->CreateWindow) { @@ -476,7 +476,6 @@ void InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) { int i, j, k, scr_index; - static unsigned long generation = 0; char **modulelist; pointer *optionlist; screenLayoutPtr layout; @@ -487,14 +486,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) xf86Initialising = TRUE; - /* Do this early? */ - if (generation != serverGeneration) { - xf86ScreenIndex = AllocateScreenPrivateIndex(); - xf86CreateRootWindowIndex = AllocateScreenPrivateIndex(); - xf86PixmapIndex = AllocatePixmapPrivateIndex(); - generation = serverGeneration; - } - if (serverGeneration == 1) { pScreenInfo->numScreens = 0; @@ -1070,8 +1061,8 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) * Hook in our ScrnInfoRec, and initialise some other pScreen * fields. */ - screenInfo.screens[scr_index]->devPrivates[xf86ScreenIndex].ptr - = (pointer)xf86Screens[i]; + dixSetPrivate(&screenInfo.screens[scr_index]->devPrivates, + xf86ScreenKey, xf86Screens[i]); xf86Screens[i]->pScreen = screenInfo.screens[scr_index]; /* The driver should set this, but make sure it is set anyway */ xf86Screens[i]->vtSema = TRUE; @@ -1087,8 +1078,9 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) i, xf86Screens[i]->pScreen->CreateWindow ); #endif - screenInfo.screens[scr_index]->devPrivates[xf86CreateRootWindowIndex].ptr - = (void*)(xf86Screens[i]->pScreen->CreateWindow); + dixSetPrivate(&screenInfo.screens[scr_index]->devPrivates, + xf86CreateRootWindowKey, + xf86Screens[i]->pScreen->CreateWindow); xf86Screens[i]->pScreen->CreateWindow = xf86CreateRootWindow; #ifdef RENDER @@ -1203,8 +1195,6 @@ OsVendorInit() { static Bool beenHere = FALSE; - xf86WrapperInit(); - #ifdef SIGCHLD signal(SIGCHLD, SIG_DFL); /* Need to wait for child processes */ #endif @@ -1307,13 +1297,9 @@ AbortDDX() /* * try to restore the original video state */ -#ifdef HAS_USL_VTS - /* Need the sleep when starting X from within another X session */ - sleep(1); -#endif #ifdef DPMSExtension /* Turn screens back on */ if (DPMSPowerLevel != DPMSModeOn) - DPMSSet(DPMSModeOn); + DPMSSet(serverClient, DPMSModeOn); #endif if (xf86Screens) { if (xf86Screens[0]->vtSema) |