summaryrefslogtreecommitdiff
path: root/cfb/cfballpriv.c
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-14 16:49:22 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-14 16:49:22 +0000
commitd568221710959cf7d783e6ff0fb80fb43a231124 (patch)
tree8d6f039393294c6ffac8533639afdebe5d68bfc1 /cfb/cfballpriv.c
parent9508a382f8a9f241dab097d921b6d290c1c3a776 (diff)
Diffstat (limited to 'cfb/cfballpriv.c')
-rw-r--r--cfb/cfballpriv.c16
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