summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2007-06-27 13:09:08 +0200
committerDanny Baumann <dannybaumann@web.de>2007-06-27 13:09:08 +0200
commit513ff381bdf55d4d778f3c868dd67703361c841e (patch)
tree0aab159f2ff12ac86fa818180c98ecb56045c377
parentc37da9c976d7563d8a13a79623a00c6488cdf8b2 (diff)
download3d-513ff381bdf55d4d778f3c868dd67703361c841e.tar.gz
3d-513ff381bdf55d4d778f3c868dd67703361c841e.tar.bz2
Fix wrapping order issue.
-rw-r--r--3d.c47
1 files changed, 32 insertions, 15 deletions
diff --git a/3d.c b/3d.c
index 8cd28a2..920907c 100644
--- a/3d.c
+++ b/3d.c
@@ -973,7 +973,7 @@ static Bool tdInitPluginForDisplay (CompPlugin *p, CompDisplay *d)
compLogMessage (d, "3d", CompLogLevelError,
"Can't get cube plugin vTable");
}
- else
+ else
{
option = (*p->vTable->getDisplayOptions) (p, d, &nOption);
@@ -987,6 +987,25 @@ static Bool tdInitPluginForDisplay (CompPlugin *p, CompDisplay *d)
cubeDisplayPrivateIndex = getIntOptionNamed (option, nOption, "index", -1);
}
}
+
+ if (cubeDisplayPrivateIndex >= 0)
+ {
+ CompScreen *s;
+
+ /* we have to wrap those functions here in other to have
+ them wrapped before the cube functions */
+ for (s = d->screens; s; s = s->next)
+ {
+ TD_SCREEN(s);
+
+ WRAP(tds, s, paintTransformedOutput, tdPaintTransformedOutput);
+ WRAP(tds, s, paintWindow, tdPaintWindow);
+ WRAP(tds, s, paintOutput, tdPaintOutput);
+ WRAP(tds, s, donePaintScreen, tdDonePaintScreen);
+ WRAP(tds, s, preparePaintScreen, tdPreparePaintScreen);
+ WRAP(tds, s, initWindowWalker, tdInitWindowWalker);
+ }
+ }
}
UNWRAP (tdd, d, initPluginForDisplay);
@@ -1006,6 +1025,18 @@ static void tdFiniPluginForDisplay (CompPlugin *p, CompDisplay *d)
if (strcmp(p->vTable->name, "cube") == 0)
{
+ CompScreen *s;
+ for (s = d->screens; s; s = s->next)
+ {
+ TD_SCREEN (s);
+ UNWRAP(tds, s, paintTransformedOutput);
+ UNWRAP(tds, s, paintWindow);
+ UNWRAP(tds, s, paintOutput);
+ UNWRAP(tds, s, donePaintScreen);
+ UNWRAP(tds, s, preparePaintScreen);
+ UNWRAP(tds, s, initWindowWalker);
+ }
+
cubeDisplayPrivateIndex = -1;
}
}
@@ -1025,13 +1056,6 @@ static Bool tdInitPluginForScreen (CompPlugin *p, CompScreen *s)
{
CUBE_SCREEN (s);
- WRAP(tds, s, paintTransformedOutput, tdPaintTransformedOutput);
- WRAP(tds, s, paintWindow, tdPaintWindow);
- WRAP(tds, s, paintOutput, tdPaintOutput);
- WRAP(tds, s, donePaintScreen, tdDonePaintScreen);
- WRAP(tds, s, preparePaintScreen, tdPreparePaintScreen);
- WRAP(tds, s, initWindowWalker, tdInitWindowWalker);
-
WRAP(tds, cs, paintTop, tdCubePaintTop);
WRAP(tds, cs, paintBottom, tdCubePaintBottom);
}
@@ -1052,13 +1076,6 @@ static void tdFiniPluginForScreen (CompPlugin *p, CompScreen *s)
{
CUBE_SCREEN (s);
- UNWRAP(tds, s, paintTransformedOutput);
- UNWRAP(tds, s, paintWindow);
- UNWRAP(tds, s, paintOutput);
- UNWRAP(tds, s, donePaintScreen);
- UNWRAP(tds, s, preparePaintScreen);
- UNWRAP(tds, s, initWindowWalker);
-
UNWRAP(tds, cs, paintTop);
UNWRAP(tds, cs, paintBottom);
}