Index: programs/Xserver/miext/damage/damage.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/miext/damage/damage.c,v retrieving revision 1.18 diff -u -r1.18 damage.c --- programs/Xserver/miext/damage/damage.c 3 Jul 2005 07:37:35 -0000 1.18 +++ programs/Xserver/miext/damage/damage.c 6 Oct 2005 10:16:28 -0000 @@ -223,19 +223,20 @@ if (clip || pDamage->pDrawable != pDrawable) { pDamageRegion = &clippedRec; - if (pDamage->pDrawable->type == DRAWABLE_WINDOW) + if (pDamage->pDrawable->type == DRAWABLE_WINDOW) { pClip = &((WindowPtr)(pDamage->pDrawable))->borderClip; - else - { + REGION_INTERSECT (pScreen, pDamageRegion, pRegion, + &((WindowPtr)(pDamage->pDrawable))->borderClip); + } else { BoxRec box; box.x1 = draw_x; box.y1 = draw_y; box.x2 = draw_x + pDamage->pDrawable->width; box.y2 = draw_y + pDamage->pDrawable->height; REGION_INIT(pScreen, &pixClip, &box, 1); - pClip = &pixClip; + REGION_INTERSECT (pScreen, pDamageRegion, pRegion, &pixClip); + REGION_UNINIT(pScreen, &pixClip); } - REGION_INTERSECT (pScreen, pDamageRegion, pRegion, pClip); /* * Short circuit empty results */ @@ -269,6 +270,7 @@ &pDamage->damage, pDamageRegion); (*pDamage->damageReport) (pDamage, &tmpRegion, pDamage->closure); } + REGION_UNINIT(pScreen, &tmpRegion); break; case DamageReportBoundingBox: tmpBox = *REGION_EXTENTS (pScreen, &pDamage->damage);