[compiz] [PATCH] Scale z by 1 instead of 0
Erkin Bahceci
erkinbah at gmail.com
Tue Jun 26 19:17:30 PDT 2007
Hi,
Currently some plugins call matrixScale with z parameter 0. This
probably wasn't the intention and it might cause problems (it did in
the past). 1 should be passed instead. This patch fixes this typo.
Regards,
Erkin
-------------- next part --------------
From 6051fb0ec97505bc32077ca387a247c16f35634d Mon Sep 17 00:00:00 2001
From: Erkin Bahceci <erkinbah at gmail.com>
Date: Tue, 26 Jun 2007 22:05:53 -0400
Subject: [PATCH] Scale z by 1 instead of 0.
---
plugins/minimize.c | 2 +-
plugins/resize.c | 2 +-
plugins/scale.c | 2 +-
plugins/switcher.c | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/plugins/minimize.c b/plugins/minimize.c
index 0fdbd84..4b8ee68 100644
--- a/plugins/minimize.c
+++ b/plugins/minimize.c
@@ -548,7 +548,7 @@ minPaintWindow (CompWindow *w,
mask |= PAINT_WINDOW_TRANSLUCENT_MASK;
matrixTranslate (&wTransform, w->attrib.x, w->attrib.y, 0.0f);
- matrixScale (&wTransform, mw->xScale, mw->yScale, 0.0f);
+ matrixScale (&wTransform, mw->xScale, mw->yScale, 1.0f);
matrixTranslate (&wTransform,
mw->tx / mw->xScale - w->attrib.x,
mw->ty / mw->yScale - w->attrib.y,
diff --git a/plugins/resize.c b/plugins/resize.c
index a078861..898295d 100644
--- a/plugins/resize.c
+++ b/plugins/resize.c
@@ -996,7 +996,7 @@ resizePaintWindow (CompWindow *w,
yOrigin = w->attrib.y - w->input.top;
matrixTranslate (&wTransform, xOrigin, yOrigin, 0.0f);
- matrixScale (&wTransform, xScale, yScale, 0.0f);
+ matrixScale (&wTransform, xScale, yScale, 1.0f);
matrixTranslate (&wTransform,
(rd->geometry.x - w->attrib.x) / xScale - xOrigin,
(rd->geometry.y - w->attrib.y) / yScale - yOrigin,
diff --git a/plugins/scale.c b/plugins/scale.c
index f0f8e52..b2889c1 100644
--- a/plugins/scale.c
+++ b/plugins/scale.c
@@ -384,7 +384,7 @@ scalePaintWindow (CompWindow *w,
mask |= PAINT_WINDOW_TRANSLUCENT_MASK;
matrixTranslate (&wTransform, w->attrib.x, w->attrib.y, 0.0f);
- matrixScale (&wTransform, sw->scale, sw->scale, 0.0f);
+ matrixScale (&wTransform, sw->scale, sw->scale, 1.0f);
matrixTranslate (&wTransform,
sw->tx / sw->scale - w->attrib.x,
sw->ty / sw->scale - w->attrib.y,
diff --git a/plugins/switcher.c b/plugins/switcher.c
index a88521a..b6c332c 100644
--- a/plugins/switcher.c
+++ b/plugins/switcher.c
@@ -1496,7 +1496,7 @@ switchPaintThumb (CompWindow *w,
mask |= PAINT_WINDOW_TRANSLUCENT_MASK;
matrixTranslate (&wTransform, w->attrib.x, w->attrib.y, 0.0f);
- matrixScale (&wTransform, sAttrib.xScale, sAttrib.yScale, 0.0f);
+ matrixScale (&wTransform, sAttrib.xScale, sAttrib.yScale, 1.0f);
matrixTranslate (&wTransform,
sAttrib.xTranslate / sAttrib.xScale - w->attrib.x,
sAttrib.yTranslate / sAttrib.yScale - w->attrib.y,
@@ -1599,7 +1599,7 @@ switchPaintThumb (CompWindow *w,
initFragmentAttrib (&fragment, &sAttrib);
matrixTranslate (&wTransform, w->attrib.x, w->attrib.y, 0.0f);
- matrixScale (&wTransform, sAttrib.xScale, sAttrib.yScale, 0.0f);
+ matrixScale (&wTransform, sAttrib.xScale, sAttrib.yScale, 1.0f);
matrixTranslate (&wTransform,
sAttrib.xTranslate / sAttrib.xScale - w->attrib.x,
sAttrib.yTranslate / sAttrib.yScale - w->attrib.y,
--
1.4.4.2
More information about the compiz
mailing list