Index: miext/damage/damage.c =================================================================== RCS file: /cvs/xserver/xserver/miext/damage/damage.c,v retrieving revision 1.15 diff -u -r1.15 damage.c --- miext/damage/damage.c 7 Jul 2005 08:37:54 -0000 1.15 +++ miext/damage/damage.c 9 Oct 2005 15:59:49 -0000 @@ -281,20 +281,28 @@ RegionRec region; int rir; - /* Find out if the drawing is entirely within the clip */ - rir = RECT_IN_REGION (pDrawable->pScreen, - pCompositeClip, pBox); - - /* No overlap at all: no damage */ - if (rir == rgnOUT) - return; - - REGION_INIT (pDrawable->pScreen, ®ion, pBox, 1); - if (rir == rgnPART) + if (pDrawable->type == DRAWABLE_WINDOW && + ((WindowPtr)(pDrawable))->backingStore == NotUseful) { - REGION_INTERSECT (pDrawable->pScreen, ®ion, - ®ion, pCompositeClip); + /* Find out if the drawing is entirely within the clip */ + rir = RECT_IN_REGION (pDrawable->pScreen, + pCompositeClip, pBox); + + /* No overlap at all: no damage */ + if (rir == rgnOUT) + return; + + REGION_INIT (pDrawable->pScreen, ®ion, pBox, 1); + if (rir == rgnPART) + { + REGION_INTERSECT (pDrawable->pScreen, ®ion, + ®ion, pCompositeClip); + } + } else { + /* Backing store enabled: don't clip */ + REGION_INIT (pDrawable->pScreen, ®ion, pBox, 1); } + damageDamageRegion (pDrawable, ®ion); REGION_UNINIT (pDrawable->pScreen, ®ion); }