summaryrefslogtreecommitdiff
path: root/damageext
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-09-20 14:43:41 -0500
committerKeith Packard <keithp@keithp.com>2013-09-20 17:42:13 -0500
commit7d3d4ae55dd6ee338439e2424ac423b1df80501b (patch)
treec3e6fa6832d15644359aeae582fff3f0850f8dd2 /damageext
parent8010d3a48bd0b224dcb0883e39c2351ad364d846 (diff)
damage: Must translate initial window damage by window offset
Damage is reported relative to the drawable origin, but the window borderClip is absolute. Translate the region by the window position before reporting damage to adjust. Reported-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'damageext')
-rw-r--r--damageext/damageext.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/damageext/damageext.c b/damageext/damageext.c
index a942ffa68..cf6b63bf5 100644
--- a/damageext/damageext.c
+++ b/damageext/damageext.c
@@ -223,7 +223,9 @@ ProcDamageCreate(ClientPtr client)
if (pDrawable->type == DRAWABLE_WINDOW) {
pRegion = &((WindowPtr) pDrawable)->borderClip;
+ RegionTranslate(pRegion, -pDrawable->x, -pDrawable->y);
DamageReportDamage(pDamageExt->pDamage, pRegion);
+ RegionTranslate(pRegion, pDrawable->x, pDrawable->y);
}
return Success;