summaryrefslogtreecommitdiff
path: root/miext
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2004-08-12 08:45:33 +0000
committerEric Anholt <anholt@freebsd.org>2004-08-12 08:45:33 +0000
commit961333143e2df3e3f33e8624fc61e79cf3e86cd1 (patch)
tree8fbe2176cee4d7f4e4f8fb5bdd58fc697d36d3fc /miext
parent6e0228722cc2fa37a0e2359bc3dab3646e36c4b7 (diff)
Apply a kludge to initialize the composite wrapper before DamageSetup. If
not, DamageSetup will wrap some operations first, and the cw initializes during ExtensionInit, so cw comes higher in the wrapping chain. cw going first will result in damage getting confused when the drawables get changed around.
Diffstat (limited to 'miext')
-rwxr-xr-xmiext/damage/damage.c13
1 files changed, 13 insertions, 0 deletions
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;