summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--composite/compinit.c3
-rw-r--r--mi/miinitext.c4
-rwxr-xr-xmiext/damage/damage.c13
3 files changed, 14 insertions, 6 deletions
diff --git a/composite/compinit.c b/composite/compinit.c
index f3dc0373e..759c1d3f9 100644
--- a/composite/compinit.c
+++ b/composite/compinit.c
@@ -26,7 +26,6 @@
#include <config.h>
#endif
#include "compint.h"
-#include "cw.h"
int CompScreenPrivateIndex;
int CompWindowPrivateIndex;
@@ -362,8 +361,6 @@ compScreenInit (ScreenPtr pScreen)
cs->CloseScreen = pScreen->CloseScreen;
pScreen->CloseScreen = compCloseScreen;
- miInitializeCompositeWrapper(pScreen);
-
pScreen->devPrivates[CompScreenPrivateIndex].ptr = (pointer) cs;
return TRUE;
}
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 66e4bf5e8..28f9d1532 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/mi/miinitext.c,v 1.10 2004/07/31 09:41:27 kem Exp $ */
+/* $XdotOrg: xc/programs/Xserver/mi/miinitext.c,v 1.11 2004/08/03 05:39:19 anholt Exp $ */
/* $XFree86: xc/programs/Xserver/mi/miinitext.c,v 3.67 2003/01/12 02:44:27 dawes Exp $ */
/***********************************************************
@@ -493,7 +493,6 @@ InitExtensions(argc, argv)
if (!noCompositeExtension) CompositeExtensionInit();
#endif
#ifdef DAMAGE
- /* Must be after Composite to layer with composite wrapper properly */
DamageExtensionInit();
#endif
}
@@ -626,7 +625,6 @@ static ExtensionModule staticExtensions[] = {
{ CompositeExtensionInit, "COMPOSITE", &noCompositeExtension, NULL },
#endif
#ifdef DAMAGE
- /* Must be after Composite to layer with composite wrapper properly */
{ DamageExtensionInit, "DAMAGE", NULL, NULL },
#endif
#ifdef XEVIE
diff --git a/miext/damage/damage.c b/miext/damage/damage.c
index 98f42e54c..e27b95e80 100755
--- a/miext/damage/damage.c
+++ b/miext/damage/damage.c
@@ -37,6 +37,9 @@
#include "gcstruct.h"
#include "damage.h"
#include "damagestr.h"
+#ifdef COMPOSITE
+#include "cw.h"
+#endif
#define wrap(priv, real, mem, func) {\
priv->mem = real->mem; \
@@ -1729,6 +1732,16 @@ DamageSetup (ScreenPtr pScreen)
if (!pScrPriv)
return FALSE;
+#ifdef COMPOSITE
+ /* This is a kludge to ensure wrapping order with the composite wrapper.
+ * If it's done from compinit.c, then DamageSetup may be called before the
+ * extension init phase, so that cw will be higher in the wrapping chain and
+ * rewrite drawables before damage gets to it, causing confusion.
+ */
+ if (!noCompositeExtension)
+ miInitializeCompositeWrapper (pScreen);
+#endif
+
pScrPriv->internalLevel = 0;
pScrPriv->pScreenDamage = 0;