summaryrefslogtreecommitdiff
path: root/hw/xwin/winallpriv.c
diff options
context:
space:
mode:
authorColin Harrison <colin.harrison@virgin.net>2010-06-16 18:07:04 +0100
committerKeith Packard <keithp@keithp.com>2010-06-22 11:06:30 -0700
commit37734ba79ca3a9bad1c1e29d89710c8f9c299210 (patch)
tree1d283efc67ca5152912bef14bf647b2e72985189 /hw/xwin/winallpriv.c
parentf7dae972aac28c5792566e997c40254e787d246a (diff)
XWin: Fixes for devPrivates API change
Fix some typos in devPrivates API changes in XWin code. Move allocation of private keys as it's no longer valid to do them during OsVendorInit() Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'hw/xwin/winallpriv.c')
-rw-r--r--hw/xwin/winallpriv.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/hw/xwin/winallpriv.c b/hw/xwin/winallpriv.c
index 6ecbff6d3..ef42d71f4 100644
--- a/hw/xwin/winallpriv.c
+++ b/hw/xwin/winallpriv.c
@@ -74,25 +74,32 @@ winAllocatePrivates (ScreenPtr pScreen)
/* Intialize private structure members */
pScreenPriv->fActive = TRUE;
+ /* Register our screen private */
+ if (!dixRegisterPrivateKey(g_iScreenPrivateKey, PRIVATE_SCREEN, 0))
+ {
+ ErrorF ("winAllocatePrivates - AllocateScreenPrivate () 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;
@@ -161,6 +168,13 @@ winAllocateCmapPrivates (ColormapPtr pCmap)
/* Initialize the memory of the private structure */
ZeroMemory (pCmapPriv, sizeof (winPrivCmapRec));
+ /* Register our colourmap private */
+ if (!dixRegisterPrivateKey(g_iCmapPrivateKey, PRIVATE_COLORMAP, 0))
+ {
+ ErrorF ("winAllocateCmapPrivates - AllocateCmapPrivate () failed\n");
+ return FALSE;
+ }
+
/* Save the cmap private pointer */
winSetCmapPriv (pCmap, pCmapPriv);