diff options
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; |