summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2008-11-08 01:25:14 +0100
committerMichel Dänzer <michel@tungstengraphics.com>2008-11-08 01:25:14 +0100
commit21c116219cd5c6845a0955f2d88fdb5fab5c17cf (patch)
tree54d8601c379b31d447534d91842d2949502bc2e4
parent59f9fb4b8c031df69b3592a26b77e744ff4a556e (diff)
Fix typos which caused exaCompositeRects() to use an incorrect damage region.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=18065 . Also, it can bail if either width or height of the bounding box is <= 0, not only if both of them are.
-rw-r--r--exa/exa_render.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/exa/exa_render.c b/exa/exa_render.c
index 199af36e2..45cfff70a 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -492,17 +492,17 @@ exaCompositeRects(CARD8 op,
r = rects;
while (n--) {
int rect_x2 = r->xDst + r->width;
- int rect_y2 = r->yDst + r->width;
+ int rect_y2 = r->yDst + r->height;
if (r->xDst < x1) x1 = r->xDst;
- if (r->xDst < y1) y1 = r->xDst;
+ if (r->yDst < y1) y1 = r->yDst;
if (rect_x2 > x2) x2 = rect_x2;
if (rect_y2 > y2) y2 = rect_y2;
r++;
}
- if (x2 <= x1 && y2 <= y1)
+ if (x2 <= x1 || y2 <= y1)
return;
box.x1 = x1;