Hello community,
here is the log from the commit of package compiz for openSUSE:Factory
checked in at Fri Jan 30 00:09:16 CET 2009.
--------
--- compiz/compiz.changes 2009-01-28 22:56:50.000000000 +0100
+++ compiz/compiz.changes 2009-01-29 21:27:58.000000000 +0100
@@ -1,0 +2,5 @@
+Thu Jan 29 15:14:10 EST 2009 - davidr(a)novell.com
+
+- Properly handle viewport paint offsets. (bnc#437576)
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ compiz.spec ++++++
--- /var/tmp/diff_new_pack.C21143/_old 2009-01-30 00:08:11.000000000 +0100
+++ /var/tmp/diff_new_pack.C21143/_new 2009-01-30 00:08:11.000000000 +0100
@@ -41,7 +41,7 @@
%endif
AutoReqProv: on
Version: 0.7.8
-Release: 18
+Release: 19
Requires: compiz-decorator = %{version} compiz-branding = %{version}
Provides: windowmanager
Summary: OpenGL window and compositing manager.
@@ -423,6 +423,8 @@
%_datadir/compiz/sle.png
%changelog
+* Thu Jan 29 2009 davidr(a)novell.com
+- Properly handle viewport paint offsets. (bnc#437576)
* Wed Jan 28 2009 davidr(a)novell.com
- Make sure screen edges are created before they are first
used. (bnc#444449)
++++++ compiz-0.7.8-NOMAD.diff ++++++
--- /var/tmp/diff_new_pack.C21143/_old 2009-01-30 00:08:12.000000000 +0100
+++ /var/tmp/diff_new_pack.C21143/_new 2009-01-30 00:08:12.000000000 +0100
@@ -8100,7 +8100,7 @@
if (!disableSm)
diff --git a/src/paint.c b/src/paint.c
-index a2051fa..1c32b4b 100644
+index a2051fa..1142e49 100644
--- a/src/paint.c
+++ b/src/paint.c
@@ -26,6 +26,7 @@
@@ -8271,7 +8271,8 @@
-
- if (w == fullscreenWindow)
- continue;
--
++ paintBackground (screen, r, (mask & PAINT_SCREEN_TRANSFORMED_MASK));
+
- if (!w->shaded)
- {
- if (w->attrib.map_state != IsViewable || !w->damaged)
@@ -8280,14 +8281,18 @@
-
- if (!(mask & PAINT_SCREEN_NO_OCCLUSION_DETECTION_MASK))
- clip = w->clip;
--
++ (*painter.paintObject) (&screen->root,
++ &screen->root.paint,
++ transform,
++ r,
++ windowMask);
+
- if ((screen->windowOffsetX != 0 || screen->windowOffsetY != 0) &&
- !windowOnAllViewports (w))
- {
- getWindowMovementForOffset (w, screen->windowOffsetX,
- screen->windowOffsetY, &offX, &offY);
-+ paintBackground (screen, r, (mask & PAINT_SCREEN_TRANSFORMED_MASK));
-
+-
- vTransform = *transform;
- matrixTranslate (&vTransform, offX, offY, 0);
- (*screen->paintWindow) (w, &w->paint, &vTransform, clip,
@@ -8299,12 +8304,7 @@
- windowMask);
- }
- }
-+ (*painter.paintObject) (&screen->root,
-+ &screen->root.paint,
-+ transform,
-+ r,
-+ windowMask);
-
+-
- if (walk.fini)
- (*walk.fini) (screen, &walk);
+ if (painter.fini)
@@ -8327,17 +8327,17 @@
-
- GLdouble p1[2] = { region->extents.x1, h - region->extents.y2 };
- GLdouble p2[2] = { region->extents.x2, h - region->extents.y1 };
--
-- GLdouble halfW = output->width / 2.0;
-- GLdouble halfH = output->height / 2.0;
--
-- GLdouble cx = output->region.extents.x1 + halfW;
-- GLdouble cy = (h - output->region.extents.y2) + halfH;
+ GLdouble x1 = region->extents.x1 > 0 ? 1.0 / region->extents.x1 : MAXSHORT;
+ GLdouble y1 = region->extents.y1 > 0 ? 1.0 / region->extents.y1 : MAXSHORT;
+ GLdouble x2 = region->extents.x2 > 0 ? 1.0 / region->extents.x2 : MAXSHORT;
+ GLdouble y2 = region->extents.y2 > 0 ? 1.0 / region->extents.y2 : MAXSHORT;
+- GLdouble halfW = output->width / 2.0;
+- GLdouble halfH = output->height / 2.0;
+-
+- GLdouble cx = output->region.extents.x1 + halfW;
+- GLdouble cy = (h - output->region.extents.y2) + halfH;
+-
- GLdouble top[4] = { 0.0, halfH / (cy - p1[1]), 0.0, 0.5 };
- GLdouble bottom[4] = { 0.0, halfH / (cy - p2[1]), 0.0, 0.5 };
- GLdouble left[4] = { halfW / (cx - p1[0]), 0.0, 0.0, 0.5 };
@@ -8376,15 +8376,15 @@
- paintOutputRegion (screen, &sTransform, region, output, mask);
-
- glPopMatrix ();
--
++ transformToScreenSpace (screen, output, -sAttrib->zTranslate, &sTransform);
+
- screen->disableOutputClipping (screen);
- }
- else
- {
- transformToScreenSpace (screen, output, -sAttrib->zTranslate,
- &sTransform);
-+ transformToScreenSpace (screen, output, -sAttrib->zTranslate, &sTransform);
-
+-
- glPushMatrix ();
- glLoadMatrixf (sTransform.m);
+ glPushMatrix ();
@@ -8414,7 +8414,52 @@
if (!w->texture->pixmap && !bindWindow (w))
return FALSE;
-@@ -1217,8 +1080,10 @@ paintWindow (CompWindow *w,
+@@ -1210,6 +1073,44 @@ drawWindow (CompWindow *w,
+ return TRUE;
+ }
+
++static int
++paintOffsetX (CompWindow *w,
++ int x)
++{
++ int vWidth = w->screen->width * (w->screen->hsize - 1);
++
++ if (vWidth)
++ {
++ int wx = w->attrib.x + x;
++
++ if (wx - w->input.left < -vWidth)
++ return x + vWidth + w->screen->width;
++ else if (wx + w->width + w->input.right > vWidth)
++ return x - vWidth - w->screen->width;
++ }
++
++ return x;
++}
++
++static int
++paintOffsetY (CompWindow *w,
++ int y)
++{
++ int vHeight = w->screen->height * (w->screen->vsize - 1);
++
++ if (vHeight)
++ {
++ int wy = w->attrib.y + y;
++
++ if (wy - w->input.top < -vHeight)
++ return y + vHeight + w->screen->height;
++ else if (wy + w->height + w->input.bottom > vHeight)
++ return y - vHeight - w->screen->height;
++ }
++
++ return y;
++}
++
+ Bool
+ paintWindow (CompWindow *w,
+ const WindowPaintAttrib *attrib,
+@@ -1217,8 +1118,10 @@ paintWindow (CompWindow *w,
Region region,
unsigned int mask)
{
@@ -8427,7 +8472,7 @@
w->lastPaint = *attrib;
-@@ -1229,38 +1094,401 @@ paintWindow (CompWindow *w,
+@@ -1229,38 +1132,395 @@ paintWindow (CompWindow *w,
if (mask & PAINT_WINDOW_OCCLUSION_DETECTION_MASK)
{
@@ -8502,12 +8547,9 @@
+ {
+ if (w->viewportOffsetX || w->viewportOffsetY)
+ {
-+ getWindowMovementForOffset (w,
-+ w->viewportOffsetX,
-+ w->viewportOffsetY,
-+ &viewportOffsetX,
-+ &viewportOffsetY);
-+
++ viewportOffsetX = paintOffsetX (c, w->viewportOffsetX);
++ viewportOffsetY = paintOffsetY (c, w->viewportOffsetY);
++
+ matrixTranslate (&cTransform,
+ viewportOffsetX,
+ viewportOffsetY,
@@ -8705,10 +8747,7 @@
+ attrib->brightness);
+ cPaint.saturation = MULTIPLY_USHORT (cPaint.saturation,
+ attrib->saturation);
-
-- if (mask & PAINT_WINDOW_TRANSFORMED_MASK ||
-- mask & PAINT_WINDOW_WITH_OFFSET_MASK)
-- glPopMatrix ();
++
+ if (mask & PAINT_WINDOW_CLIP_MASK)
+ clip = c->clip;
+
@@ -8716,17 +8755,17 @@
+ {
+ if (w->viewportOffsetX || w->viewportOffsetY)
+ {
-+ getWindowMovementForOffset (w,
-+ w->viewportOffsetX,
-+ w->viewportOffsetY,
-+ &viewportOffsetX,
-+ &viewportOffsetY);
++ viewportOffsetX = paintOffsetX (c, w->viewportOffsetX);
++ viewportOffsetY = paintOffsetY (c, w->viewportOffsetY);
+
+ matrixTranslate (&cTransform,
+ viewportOffsetX,
+ viewportOffsetY,
+ 0);
-+
+
+- if (mask & PAINT_WINDOW_TRANSFORMED_MASK ||
+- mask & PAINT_WINDOW_WITH_OFFSET_MASK)
+- glPopMatrix ();
+ if (clip != c->clip)
+ XOffsetRegion (clip,
+ -viewportOffsetX,
@@ -8848,7 +8887,7 @@
+ glPopMatrix ();
+}
diff --git a/src/screen.c b/src/screen.c
-index 33cb3cc..29979de 100644
+index 33cb3cc..774a717 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -184,6 +184,9 @@ setDesktopHints (CompScreen *s)
@@ -9883,10 +9922,12 @@
&value);
+ if (value != i && (value - alpha) != i)
+ continue;
-+
+
+- if (value)
+ value = 0;
+ if (i == 32)
-+ {
+ {
+- rgba = 1;
+ (*s->getFBConfigAttrib) (dpy,
+ fbConfigs[j],
+ GLX_BIND_TO_TEXTURE_RGBA_EXT,
@@ -9900,11 +9941,9 @@
+ GLX_TEXTURE_FORMAT_RGBA_EXT;
+ }
+ }
-
-- if (value)
++
+ if (!value)
- {
-- rgba = 1;
++ {
+ if (rgba)
+ continue;
+
@@ -9945,15 +9984,15 @@
- s->glxPixmapFBConfigs[i].textureFormat =
- GLX_TEXTURE_FORMAT_RGB_EXT;
- }
-+ stencil = value;
-
+-
- (*s->getFBConfigAttrib) (dpy,
- fbConfigs[j],
- GLX_DOUBLEBUFFER,
- &value);
- if (value > db)
- continue;
--
++ stencil = value;
+
- db = value;
+ (*s->getFBConfigAttrib) (dpy,
+ fbConfigs[j],
@@ -10727,14 +10766,22 @@
s->display->currentDesktopAtom,
XA_CARDINAL, 32, PropModeReplace,
(unsigned char *) &data, 1);
-@@ -4292,6 +4348,6 @@ setWindowPaintOffset (CompScreen *s,
+@@ -4292,6 +4348,14 @@ setWindowPaintOffset (CompScreen *s,
int x,
int y)
{
- s->windowOffsetX = x;
- s->windowOffsetY = y;
-+ s->root.viewportOffsetX = x;
-+ s->root.viewportOffsetY = y;
++ x = (s->x * s->width) - x;
++ x = MOD (x, s->hsize * s->width);
++ x -= (s->x * s->width);
++
++ y = (s->y * s->height) - y;
++ y = MOD (y, s->vsize * s->height);
++ y -= (s->y * s->height);
++
++ s->root.viewportOffsetX = -x;
++ s->root.viewportOffsetY = -y;
}
diff --git a/src/window.c b/src/window.c
index 881bbd5..16746eb 100644
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org