summaryrefslogtreecommitdiff
path: root/3d.c
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@opencompositing.org>2007-10-09 13:48:45 +0200
committerDennis Kasprzyk <onestone@opencompositing.org>2007-10-09 13:48:45 +0200
commit6552b53b83017ce9fc8d4ba5f1b2801a9e04093e (patch)
treed57407c86e7abd37e0feef7ffbf73bf624cb3d62 /3d.c
parentd34f465e4f9457e0186ac8825631ff2f48514e59 (diff)
download3d-6552b53b83017ce9fc8d4ba5f1b2801a9e04093e.tar.gz
3d-6552b53b83017ce9fc8d4ba5f1b2801a9e04093e.tar.bz2
Use window offsets to translate windows correctly.
Diffstat (limited to '3d.c')
-rw-r--r--3d.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/3d.c b/3d.c
index a68dba7..f4cf85a 100644
--- a/3d.c
+++ b/3d.c
@@ -593,6 +593,8 @@ tdPostPaintViewport (CompScreen *s,
for (w = (*walk.first) (s); w; w = (*walk.next) (w))
{
CompTransform mTransform = sTransform;
+ int offX, offY;
+ unsigned int newMask = PAINT_WINDOW_ON_TRANSFORMED_SCREEN_MASK;
TD_WINDOW (w);
@@ -626,11 +628,23 @@ tdPostPaintViewport (CompScreen *s,
transformToScreenSpace (s, output, -sAttrib->zTranslate,
&mTransform);
+ if ((s->windowOffsetX != 0 || s->windowOffsetY != 0) &&
+ !windowOnAllViewports (w))
+ {
+ getWindowMovementForOffset (w, s->windowOffsetX,
+ s->windowOffsetY, &offX, &offY);
+
+ matrixTranslate (&mTransform, offX, offY, 0);
+ matrixTranslate (&tds->bTransform, offX, offY, 0);
+
+ newMask |= PAINT_WINDOW_WITH_OFFSET_MASK;
+ }
+
glPushMatrix ();
glLoadMatrixf (mTransform.m);
(*s->paintWindow) (w, &w->paint, &mTransform, &infiniteRegion,
- PAINT_WINDOW_ON_TRANSFORMED_SCREEN_MASK);
+ newMask);
glPopMatrix ();
(*s->disableOutputClipping) (s);