summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@opencompositing.org>2008-04-16 15:56:58 +0200
committerDennis kasprzyk <onestone@opencompositing.org>2008-04-16 15:56:58 +0200
commit8608a8553ad08d178fabef35384ea3f0fe624011 (patch)
tree841d51400a3fd79455ea4d37a80299a71b90327f
parentdb7816be0cdc4f9aef3943ad9bf4af587902fcc3 (diff)
download3d-8608a8553ad08d178fabef35384ea3f0fe624011.tar.gz
3d-8608a8553ad08d178fabef35384ea3f0fe624011.tar.bz2
Use cube changes to paint the desctop in correct order.
-rw-r--r--3d.c33
1 files changed, 22 insertions, 11 deletions
diff --git a/3d.c b/3d.c
index 094aa49..6a794a7 100644
--- a/3d.c
+++ b/3d.c
@@ -69,7 +69,7 @@ typedef struct _tdScreen
ApplyScreenTransformProc applyScreenTransform;
PaintWindowProc paintWindow;
- CubePostPaintViewportProc postPaintViewport;
+ CubePaintViewportProc paintViewport;
CubeShouldPaintViewportProc shouldPaintViewport;
Bool active;
@@ -416,18 +416,22 @@ tdApplyScreenTransform (CompScreen *s,
}
static void
-tdPostPaintViewport (CompScreen *s,
- const ScreenPaintAttrib *sAttrib,
- const CompTransform *transform,
- CompOutput *output,
- Region region)
+tdPaintViewport (CompScreen *s,
+ const ScreenPaintAttrib *sAttrib,
+ const CompTransform *transform,
+ Region region,
+ CompOutput *output,
+ unsigned int mask)
{
TD_SCREEN (s);
CUBE_SCREEN (s);
- UNWRAP (tds, cs, postPaintViewport);
- (*cs->postPaintViewport) (s, sAttrib, transform, output, region);
- WRAP (tds, cs, postPaintViewport, tdPostPaintViewport);
+ if (cs->paintOrder == BTF)
+ {
+ UNWRAP (tds, cs, paintViewport);
+ (*cs->paintViewport) (s, sAttrib, transform, region, output, mask);
+ WRAP (tds, cs, paintViewport, tdPaintViewport);
+ }
if (tds->active)
{
@@ -557,6 +561,13 @@ tdPostPaintViewport (CompScreen *s,
tds->painting3D = FALSE;
tds->currentScale = tds->basicScale;
}
+
+ if (cs->paintOrder == FTB)
+ {
+ UNWRAP (tds, cs, paintViewport);
+ (*cs->paintViewport) (s, sAttrib, transform, region, output, mask);
+ WRAP (tds, cs, paintViewport, tdPaintViewport);
+ }
}
static Bool
@@ -735,7 +746,7 @@ tdInitScreen (CompPlugin *p,
WRAP (tds, s, donePaintScreen, tdDonePaintScreen);
WRAP (tds, s, preparePaintScreen, tdPreparePaintScreen);
WRAP (tds, s, applyScreenTransform, tdApplyScreenTransform);
- WRAP (tds, cs, postPaintViewport, tdPostPaintViewport);
+ WRAP (tds, cs, paintViewport, tdPaintViewport);
WRAP (tds, cs, shouldPaintViewport, tdShouldPaintViewport);
return TRUE;
@@ -753,7 +764,7 @@ tdFiniScreen (CompPlugin *p,
UNWRAP (tds, s, donePaintScreen);
UNWRAP (tds, s, preparePaintScreen);
UNWRAP (tds, s, applyScreenTransform);
- UNWRAP (tds, cs, postPaintViewport);
+ UNWRAP (tds, cs, paintViewport);
UNWRAP (tds, cs, shouldPaintViewport);
freeWindowPrivateIndex (s, tds->windowPrivateIndex);