From e26dec8f5278df74a102493bf6d2d8444dab5d6d Mon Sep 17 00:00:00 2001 From: Gaetan Nadon Date: Mon, 28 Oct 2013 22:21:29 +0000 Subject: vmwgfx: handle changes of DamageUnregister API in 1.14.99.2 Fix is inspired from the intel driver. Reviewed-by: Jakob Bornecrantz Signed-off-by: Gaetan Nadon Signed-off-by: Jakob Bornecrantz --- diff --git a/vmwgfx/vmwgfx_saa.c b/vmwgfx/vmwgfx_saa.c index fd80682..346e7f4 100644 --- a/vmwgfx/vmwgfx_saa.c +++ b/vmwgfx/vmwgfx_saa.c @@ -26,6 +26,7 @@ */ #include +#include #include #include #include @@ -76,7 +77,12 @@ vmwgfx_pixmap_remove_damage(PixmapPtr pixmap) if (!spix->damage || vpix->hw || vpix->gmr || vpix->malloc) return; +#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,14,99,2,0) + DamageUnregister(spix->damage); +#else DamageUnregister(&pixmap->drawable, spix->damage); +#endif + DamageDestroy(spix->damage); spix->damage = NULL; } -- cgit v0.9.0.2-2-gbebe