? Makefile Index: damage.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/miext/damage/damage.c,v retrieving revision 1.5 diff -u -p -r1.5 damage.c --- damage.c 7 Aug 2004 01:23:07 -0000 1.5 +++ damage.c 11 Aug 2004 01:47:31 -0000 @@ -715,10 +715,27 @@ damageCopyArea(DrawablePtr pSrc, { BoxRec box; - box.x1 = dstx + pDst->x; - box.x2 = box.x1 + width; - box.y1 = dsty + pDst->y; - box.y2 = box.y1 + height; + if (srcx < dstx) + { + box.x1 = srcx + pDst->x; + box.x2 = dstx + pDst->x + width; + } + else + { + box.x1 = dstx + pDst->x; + box.x2 = srcx + pDst->x + width; + } + + if (srcy < dsty) + { + box.y1 = srcy + pDst->y; + box.y2 = dsty + pDst->y + height; + } + else + { + box.y1 = dsty + pDst->y; + box.y2 = srcy + pDst->y + height; + } TRIM_BOX(box, pGC); if(BOX_NOT_EMPTY(box))