miext: damage: use dixScreenHookPostClose() instead of dixScreenHookClose()

Some drivers need to call into damage from within their CloseScreen proc,
so damage teardown needs to be done after that, instead of before.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2025-07-02 14:35:01 +02:00 committed by Enrico Weigelt
parent 56650ba873
commit 96be335fd3

View File

@ -1569,7 +1569,7 @@ damageWindowDestroy(CallbackListPtr *pcbl, ScreenPtr pScreen, WindowPtr pWindow)
static void damageCloseScreen(CallbackListPtr *pcbl, ScreenPtr pScreen, void *unused)
{
dixScreenUnhookClose(pScreen, damageCloseScreen);
dixScreenUnhookPostClose(pScreen, damageCloseScreen);
dixScreenUnhookWindowDestroy(pScreen, damageWindowDestroy);
dixScreenUnhookPixmapDestroy(pScreen, damagePixmapDestroy);
@ -1667,7 +1667,7 @@ DamageSetup(ScreenPtr pScreen)
pScrPriv->internalLevel = 0;
pScrPriv->pScreenDamage = 0;
dixScreenHookClose(pScreen, damageCloseScreen);
dixScreenHookPostClose(pScreen, damageCloseScreen);
dixScreenHookWindowDestroy(pScreen, damageWindowDestroy);
dixScreenHookPixmapDestroy(pScreen, damagePixmapDestroy);