diff --git a/dbe/midbe.c b/dbe/midbe.c index 3033062f8..379b7a024 100644 --- a/dbe/midbe.c +++ b/dbe/midbe.c @@ -162,7 +162,7 @@ miDbeAllocBackBufferName(WindowPtr pWin, XID bufId, int swapAction) (*pScreen->CreatePixmap) (pScreen, pDbeWindowPriv->width, pDbeWindowPriv->height, pWin->drawable.depth, 0))) { - dixDestroyPixmap(pDbeWindowPriv->pFrontBuffer, 0); + (*pScreen->DestroyPixmap) (pDbeWindowPriv->pFrontBuffer); return BadAlloc; } @@ -426,11 +426,14 @@ miDbeWinPrivDelete(DbeWindowPrivPtr pDbeWindowPriv, XID bufId) */ /* Destroy the front and back pixmaps. */ - if (pDbeWindowPriv->pFrontBuffer) - dixDestroyPixmap(pDbeWindowPriv->pFrontBuffer, 0); - - if (pDbeWindowPriv->pBackBuffer) - dixDestroyPixmap(pDbeWindowPriv->pBackBuffer, 0); + if (pDbeWindowPriv->pFrontBuffer) { + (*pDbeWindowPriv->pWindow->drawable.pScreen-> + DestroyPixmap) (pDbeWindowPriv->pFrontBuffer); + } + if (pDbeWindowPriv->pBackBuffer) { + (*pDbeWindowPriv->pWindow->drawable.pScreen-> + DestroyPixmap) (pDbeWindowPriv->pBackBuffer); + } } /* miDbeWinPrivDelete() */ /****************************************************************************** @@ -582,8 +585,13 @@ miDbePositionWindow(WindowPtr pWin, int x, int y) if (!pFrontBuffer || !pBackBuffer) { /* We failed at creating 1 or 2 of the pixmaps. */ - dixDestroyPixmap(pFrontBuffer, 0); - dixDestroyPixmap(pBackBuffer, 0); + if (pFrontBuffer) { + (*pScreen->DestroyPixmap) (pFrontBuffer); + } + + if (pBackBuffer) { + (*pScreen->DestroyPixmap) (pBackBuffer); + } /* Destroy all buffers for this window. */ while (pDbeWindowPriv) { @@ -634,8 +642,8 @@ miDbePositionWindow(WindowPtr pWin, int x, int y) * pixmaps. */ - dixDestroyPixmap(pDbeWindowPriv->pFrontBuffer, 0); - dixDestroyPixmap(pDbeWindowPriv->pBackBuffer, 0); + (*pScreen->DestroyPixmap) (pDbeWindowPriv->pFrontBuffer); + (*pScreen->DestroyPixmap) (pDbeWindowPriv->pBackBuffer); pDbeWindowPriv->pFrontBuffer = pFrontBuffer; pDbeWindowPriv->pBackBuffer = pBackBuffer;