summaryrefslogtreecommitdiff
path: root/miext
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2013-08-26 13:52:14 -0400
committerAdam Jackson <ajax@redhat.com>2013-09-10 14:28:09 -0400
commit28708a045de7d9043d20fb06b61c44a46eb5526b (patch)
treec74d2728fd289de3e1e41e2fdbfd7c06d453c36f /miext
parente657635dbe6b92875b0e88370557c2cbab673a49 (diff)
damage: Implicitly unregister on destroy
There's no reason not to, and it simplifies quite a few callers. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'miext')
-rw-r--r--miext/damage/damage.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/miext/damage/damage.c b/miext/damage/damage.c
index a98c20ec0..cf4b61a20 100644
--- a/miext/damage/damage.c
+++ b/miext/damage/damage.c
@@ -1637,7 +1637,6 @@ damageDestroyWindow(WindowPtr pWindow)
damageScrPriv(pScreen);
while ((pDamage = damageGetWinPriv(pWindow))) {
- DamageUnregister(&pWindow->drawable, pDamage);
DamageDestroy(pDamage);
}
unwrap(pScrPriv, pScreen, DestroyWindow);
@@ -1888,6 +1887,9 @@ DamageDestroy(DamagePtr pDamage)
damageScrPriv(pScreen);
+ if (pDamage->pDrawable)
+ DamageUnregister(pDamage->pDrawable, pDamage);
+
if (pDamage->damageDestroy)
(*pDamage->damageDestroy) (pDamage, pDamage->closure);
(*pScrPriv->funcs.Destroy) (pDamage);