diff options
Diffstat (limited to 'cfb/cfballpriv.c')
-rw-r--r-- | cfb/cfballpriv.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/cfb/cfballpriv.c b/cfb/cfballpriv.c index e0ccdf4d0..858ff6061 100644 --- a/cfb/cfballpriv.c +++ b/cfb/cfballpriv.c @@ -45,7 +45,6 @@ in this Software without prior written authorization from The Open Group. #include "mibstore.h" #if 1 || PSZ==8 -int cfbWindowPrivateIndex = -1; int cfbGCPrivateIndex = -1; #endif #ifdef CFB_NEED_SCREEN_PRIVATE @@ -55,29 +54,20 @@ static unsigned long cfbGeneration = 0; Bool -cfbAllocatePrivates(pScreen, window_index, gc_index) - ScreenPtr pScreen; - int *window_index, *gc_index; +cfbAllocatePrivates(ScreenPtr pScreen, int *gc_index) { - if (!window_index || !gc_index || - (*window_index == -1 && *gc_index == -1)) + if (!gc_index || *gc_index == -1) { - if (!mfbAllocatePrivates(pScreen, - &cfbWindowPrivateIndex, &cfbGCPrivateIndex)) + if (!mfbAllocatePrivates(pScreen, &cfbGCPrivateIndex)) return FALSE; - if (window_index) - *window_index = cfbWindowPrivateIndex; if (gc_index) *gc_index = cfbGCPrivateIndex; } else { - cfbWindowPrivateIndex = *window_index; cfbGCPrivateIndex = *gc_index; } - if (!AllocateWindowPrivate(pScreen, cfbWindowPrivateIndex, - sizeof(cfbPrivWin)) || - !AllocateGCPrivate(pScreen, cfbGCPrivateIndex, sizeof(cfbPrivGC))) + if (!AllocateGCPrivate(pScreen, cfbGCPrivateIndex, sizeof(cfbPrivGC))) return FALSE; #ifdef CFB_NEED_SCREEN_PRIVATE if (cfbGeneration != serverGeneration) |