diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-14 16:49:22 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-14 16:49:22 +0000 |
commit | d568221710959cf7d783e6ff0fb80fb43a231124 (patch) | |
tree | 8d6f039393294c6ffac8533639afdebe5d68bfc1 /cfb/cfballpriv.c | |
parent | 9508a382f8a9f241dab097d921b6d290c1c3a776 (diff) |
XFree86 4.3.0.1xf86-4_3_0_1PRE_xf86-4_3_0_1
Diffstat (limited to 'cfb/cfballpriv.c')
-rw-r--r-- | cfb/cfballpriv.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/cfb/cfballpriv.c b/cfb/cfballpriv.c index abd634e2c..6c2fa30f3 100644 --- a/cfb/cfballpriv.c +++ b/cfb/cfballpriv.c @@ -25,6 +25,7 @@ in this Software without prior written authorization from The Open Group. * * Author: Keith Packard, MIT X Consortium */ +/* $XFree86: xc/programs/Xserver/cfb/cfballpriv.c,v 1.12 2001/12/14 19:59:21 dawes Exp $ */ #include "X.h" #include "Xmd.h" @@ -41,13 +42,15 @@ in this Software without prior written authorization from The Open Group. #include "cfbmskbits.h" #include "mibstore.h" +#if PSZ==8 int cfbWindowPrivateIndex; int cfbGCPrivateIndex; +#endif #ifdef CFB_NEED_SCREEN_PRIVATE -int cfbScreenPrivateIndex; +int cfbScreenPrivateIndex = -1; +static unsigned long cfbGeneration = 0; #endif -extern RegionPtr (*cfbPuntCopyPlane)(); Bool cfbAllocatePrivates(pScreen, window_index, gc_index) @@ -55,7 +58,7 @@ cfbAllocatePrivates(pScreen, window_index, gc_index) int *window_index, *gc_index; { if (!window_index || !gc_index || - *window_index == -1 && *gc_index == -1) + (*window_index == -1 && *gc_index == -1)) { if (!mfbAllocatePrivates(pScreen, &cfbWindowPrivateIndex, &cfbGCPrivateIndex)) @@ -74,9 +77,12 @@ cfbAllocatePrivates(pScreen, window_index, gc_index) sizeof(cfbPrivWin)) || !AllocateGCPrivate(pScreen, cfbGCPrivateIndex, sizeof(cfbPrivGC))) return FALSE; - cfbPuntCopyPlane = miCopyPlane; #ifdef CFB_NEED_SCREEN_PRIVATE - cfbScreenPrivateIndex = AllocateScreenPrivateIndex (); + if (cfbGeneration != serverGeneration) + { + cfbScreenPrivateIndex = AllocateScreenPrivateIndex (); + cfbGeneration = serverGeneration; + } if (cfbScreenPrivateIndex == -1) return FALSE; #endif |