(!1711) composite: use dixDestroyPixmap() instead of direct driver call

Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping
jungle, so use the proper dix function instead.

See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-09-30 17:52:40 +02:00
parent b5f867506d
commit 9905da9e18
2 changed files with 4 additions and 6 deletions

View File

@ -310,7 +310,7 @@ compFreeClientWindow(WindowPtr pWin, XID id)
if (pPixmap) {
compRestoreWindow(pWin, pPixmap);
(*pScreen->DestroyPixmap) (pPixmap);
dixDestroyPixmap(pPixmap, 0);
}
}

View File

@ -182,7 +182,7 @@ compCheckRedirect(WindowPtr pWin)
compSetParentPixmap(pWin);
compRestoreWindow(pWin, pPixmap);
(*pScreen->DestroyPixmap) (pPixmap);
dixDestroyPixmap(pPixmap, 0);
}
}
else if (should) {
@ -380,13 +380,11 @@ compImplicitRedirect(WindowPtr pWin, WindowPtr pParent)
static void
compFreeOldPixmap(WindowPtr pWin)
{
ScreenPtr pScreen = pWin->drawable.pScreen;
if (pWin->redirectDraw != RedirectDrawNone) {
CompWindowPtr cw = GetCompWindow(pWin);
if (cw->pOldPixmap) {
(*pScreen->DestroyPixmap) (cw->pOldPixmap);
dixDestroyPixmap(cw->pOldPixmap, 0);
cw->pOldPixmap = NullPixmap;
}
}
@ -619,7 +617,7 @@ compDestroyWindow(WindowPtr pWin)
PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin);
compSetParentPixmap(pWin);
(*pScreen->DestroyPixmap) (pPixmap);
dixDestroyPixmap(pPixmap, 0);
}
ret = (*pScreen->DestroyWindow) (pWin);
cs->DestroyWindow = pScreen->DestroyWindow;