diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2007-08-28 09:28:25 -0400 |
---|---|---|
committer | Eamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil> | 2007-08-28 09:28:25 -0400 |
commit | 4017d3190234e189a0bbd33193a148d4d3c7556b (patch) | |
tree | 2ab228113d410386afde50c893f137d95974b8f3 /hw/xnest/Screen.c | |
parent | 85547073265ae9bc4ae3af920a6d3214fd1ca0c5 (diff) |
devPrivates rework: since API is already broken, switch everything
over to new system.
Need to update documentation and address some remaining vestiges of
old system such as CursorRec structure, fb "offman" structure, and
FontRec privates.
Diffstat (limited to 'hw/xnest/Screen.c')
-rw-r--r-- | hw/xnest/Screen.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c index d08e48245..f91454928 100644 --- a/hw/xnest/Screen.c +++ b/hw/xnest/Screen.c @@ -49,8 +49,6 @@ Window xnestScreenSaverWindows[MAXSCREENS]; extern void GlxWrapInitVisuals(miInitVisualsProcPtr *); #endif -static int xnestScreenGeneration = -1; - ScreenPtr xnestScreen(Window window) { @@ -146,21 +144,13 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[]) VisualID defaultVisual; int rootDepth; - if (!(AllocateWindowPrivate(pScreen, xnestWindowPrivateIndex, - sizeof(xnestPrivWin)) && - AllocateGCPrivate(pScreen, xnestGCPrivateIndex, - sizeof(xnestPrivGC)))) + if (!dixRequestPrivate(xnestWindowPrivateKey, sizeof(xnestPrivWin))) + return False; + if (!dixRequestPrivate(xnestGCPrivateKey, sizeof(xnestPrivGC))) return False; - - if (xnestScreenGeneration != serverGeneration) { - if ((xnestPixmapPrivateIndex = AllocatePixmapPrivateIndex()) < 0) - return False; - xnestScreenGeneration = serverGeneration; - } - - if (!AllocatePixmapPrivate(pScreen,xnestPixmapPrivateIndex, - sizeof (xnestPrivPixmap))) + if (!dixRequestPrivate(xnestPixmapPrivateKey, sizeof (xnestPrivPixmap))) return False; + visuals = (VisualPtr)xalloc(xnestNumVisuals * sizeof(VisualRec)); numVisuals = 0; |