diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2010-12-05 15:36:12 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2010-12-05 15:36:12 +0000 |
commit | a90ee792d96752ad1b71b9ada922fa6afe478c99 (patch) | |
tree | 6143b00f7646951d23dfe2a4fe2992ca40b77069 /xserver/fb/fballpriv.c | |
parent | bc97d4ecc0aa9e1b823565b07282f848700bd11a (diff) |
Upgrade to xorg-server 1.9.2.
Tested by ajacoutot@, krw@, shadchin@ and jasper@ on various configurations
including multihead with both zaphod and xrandr.
Diffstat (limited to 'xserver/fb/fballpriv.c')
-rw-r--r-- | xserver/fb/fballpriv.c | 44 |
1 files changed, 16 insertions, 28 deletions
diff --git a/xserver/fb/fballpriv.c b/xserver/fb/fballpriv.c index c40796c11..efeb26880 100644 --- a/xserver/fb/fballpriv.c +++ b/xserver/fb/fballpriv.c @@ -27,46 +27,34 @@ #include "fb.h" #ifdef FB_SCREEN_PRIVATE -static int fbScreenPrivateKeyIndex; -static DevPrivateKey fbScreenPrivateKey = &fbScreenPrivateKeyIndex; -DevPrivateKey fbGetScreenPrivateKey(void) -{ - return fbScreenPrivateKey; -} +static DevPrivateKeyRec fbScreenPrivateKeyRec; +DevPrivateKey +fbGetScreenPrivateKey(void) { return &fbScreenPrivateKeyRec; } #endif -static int fbGCPrivateKeyIndex; -static DevPrivateKey fbGCPrivateKey = &fbGCPrivateKeyIndex; -DevPrivateKey fbGetGCPrivateKey(void) -{ - return fbGCPrivateKey; -} +static DevPrivateKeyRec fbGCPrivateKeyRec; +DevPrivateKey +fbGetGCPrivateKey (void) { return &fbGCPrivateKeyRec; } -static int fbWinPrivateKeyIndex; -static DevPrivateKey fbWinPrivateKey = &fbWinPrivateKeyIndex; -DevPrivateKey fbGetWinPrivateKey(void) -{ - return fbWinPrivateKey; -} +static DevPrivateKeyRec fbWinPrivateKeyRec; +DevPrivateKey +fbGetWinPrivateKey (void) { return &fbWinPrivateKeyRec; } Bool fbAllocatePrivates(ScreenPtr pScreen, DevPrivateKey *pGCKey) { if (pGCKey) - *pGCKey = fbGCPrivateKey; + *pGCKey = &fbGCPrivateKeyRec; - if (!dixRequestPrivate(fbGCPrivateKey, sizeof(FbGCPrivRec))) + if (!dixRegisterPrivateKey(&fbGCPrivateKeyRec, PRIVATE_GC, sizeof(FbGCPrivRec))) return FALSE; #ifdef FB_SCREEN_PRIVATE - { - FbScreenPrivPtr pScreenPriv; - - pScreenPriv = (FbScreenPrivPtr) xalloc (sizeof (FbScreenPrivRec)); - if (!pScreenPriv) - return FALSE; - dixSetPrivate(&pScreen->devPrivates, fbScreenPrivateKey, pScreenPriv); - } + if (!dixRegisterPrivateKey(&fbScreenPrivateKeyRec, PRIVATE_SCREEN, sizeof (FbScreenPrivRec))) + return FALSE; #endif + if (!dixRegisterPrivateKey(&fbWinPrivateKeyRec, PRIVATE_WINDOW, 0)) + return FALSE; + return TRUE; } |