diff options
Diffstat (limited to 'xorg-server/hw/xwin/winallpriv.c')
-rw-r--r-- | xorg-server/hw/xwin/winallpriv.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/xorg-server/hw/xwin/winallpriv.c b/xorg-server/hw/xwin/winallpriv.c index 983a95d63..6a6dc60db 100644 --- a/xorg-server/hw/xwin/winallpriv.c +++ b/xorg-server/hw/xwin/winallpriv.c @@ -48,11 +48,9 @@ winAllocatePrivates (ScreenPtr pScreen) {
winPrivScreenPtr pScreenPriv;
-#if CYGDEBUG
winDebug ("winAllocateScreenPrivates - g_ulServerGeneration: %d "
"serverGeneration: %d\n",
g_ulServerGeneration, serverGeneration);
-#endif
/* We need a new slot for our privates if the screen gen has changed */
if (g_ulServerGeneration != serverGeneration)
@@ -74,25 +72,32 @@ winAllocatePrivates (ScreenPtr pScreen) /* Intialize private structure members */
pScreenPriv->fActive = TRUE;
+ /* Reserve screen memory for our privates */
+ if (!dixRegisterPrivateKey(g_iScreenPrivateKey, PRIVATE_SCREEN, 0))
+ {
+ ErrorF ("winAllocatePrivates - dixRegisterPrivateKey () failed\n");
+ return FALSE;
+ }
+
/* Save the screen private pointer */
winSetScreenPriv (pScreen, pScreenPriv);
/* Reserve GC memory for our privates */
- if (!dixRequestPrivateKey(g_iGCPrivateKey, PRIVATE_GC, sizeof (winPrivGCRec)))
+ if (!dixRegisterPrivateKey(g_iGCPrivateKey, PRIVATE_GC, sizeof (winPrivGCRec)))
{
ErrorF ("winAllocatePrivates - AllocateGCPrivate () failed\n");
return FALSE;
}
/* Reserve Pixmap memory for our privates */
- if (!dixRequestPrivateKey(g_iPixmapPrivateKey, PRIVATE_PIXMAP, sizeof (winPrivPixmapRec)))
+ if (!dixRegisterPrivateKey(g_iPixmapPrivateKey, PRIVATE_PIXMAP, sizeof (winPrivPixmapRec)))
{
ErrorF ("winAllocatePrivates - AllocatePixmapPrivates () failed\n");
return FALSE;
}
/* Reserve Window memory for our privates */
- if (!dixRequestPrivateKey(g_iWindowPrivateKey, PRIVATE_WINDOW, sizeof (winPrivWinRec)))
+ if (!dixRegisterPrivateKey(g_iWindowPrivateKey, PRIVATE_WINDOW, sizeof (winPrivWinRec)))
{
ErrorF ("winAllocatePrivates () - AllocateWindowPrivates () failed\n");
return FALSE;
@@ -111,9 +116,7 @@ winAllocatePrivates (ScreenPtr pScreen) Bool
winInitCmapPrivates (ColormapPtr pcmap, int index)
{
-#if CYGDEBUG
winDebug ("winInitCmapPrivates\n");
-#endif
/*
* I see no way that this function can do anything useful
@@ -139,9 +142,7 @@ winAllocateCmapPrivates (ColormapPtr pCmap) winPrivCmapPtr pCmapPriv;
static unsigned long s_ulPrivateGeneration = 0;
-#if CYGDEBUG
winDebug ("winAllocateCmapPrivates\n");
-#endif
/* Get a new privates index when the server generation changes */
if (s_ulPrivateGeneration != serverGeneration)
@@ -164,9 +165,7 @@ winAllocateCmapPrivates (ColormapPtr pCmap) /* Save the cmap private pointer */
winSetCmapPriv (pCmap, pCmapPriv);
-#if CYGDEBUG
winDebug ("winAllocateCmapPrivates - Returning\n");
-#endif
return TRUE;
}
|