Bool KdAllocatePrivates(ScreenPtr pScreen) { KdPrivScreenPtr pScreenPriv; if (kdGeneration != serverGeneration) kdGeneration = serverGeneration; if (!dixRegisterPrivateKey(&kdScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) return FALSE; pScreenPriv = calloc(1, sizeof(*pScreenPriv)); if (!pScreenPriv) return FALSE; KdSetScreenPriv(pScreen, pScreenPriv); return TRUE; }
Bool KdAllocatePrivates (ScreenPtr pScreen) { KdPrivScreenPtr pScreenPriv; if (kdGeneration != serverGeneration) { kdScreenPrivateIndex = AllocateScreenPrivateIndex(); kdGeneration = serverGeneration; } pScreenPriv = (KdPrivScreenPtr) xalloc(sizeof (*pScreenPriv)); if (!pScreenPriv) return FALSE; memset (pScreenPriv, '\0', sizeof (KdPrivScreenRec)); KdSetScreenPriv (pScreen, pScreenPriv); return TRUE; }