From eb5476381abdb699778d0387d5f1c6e3c800133d Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 30 Sep 2024 17:52:40 +0200 Subject: [PATCH] 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 Part-of: --- composite/compalloc.c | 2 +- composite/compwindow.c | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/composite/compalloc.c b/composite/compalloc.c index e52c009bd..f7048a75b 100644 --- a/composite/compalloc.c +++ b/composite/compalloc.c @@ -308,7 +308,7 @@ compFreeClientWindow(WindowPtr pWin, XID id) if (pPixmap) { compRestoreWindow(pWin, pPixmap); - (*pScreen->DestroyPixmap) (pPixmap); + dixDestroyPixmap(pPixmap, 0); } } diff --git a/composite/compwindow.c b/composite/compwindow.c index 1970860c3..40a742438 100644 --- a/composite/compwindow.c +++ b/composite/compwindow.c @@ -180,7 +180,7 @@ compCheckRedirect(WindowPtr pWin) compSetParentPixmap(pWin); compRestoreWindow(pWin, pPixmap); - (*pScreen->DestroyPixmap) (pPixmap); + dixDestroyPixmap(pPixmap, 0); } } else if (should) { @@ -378,13 +378,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; } } @@ -617,7 +615,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;