dbe: 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> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
This commit is contained in:
parent
eb5476381a
commit
668d9fc40e
28
dbe/midbe.c
28
dbe/midbe.c
|
@ -162,7 +162,7 @@ miDbeAllocBackBufferName(WindowPtr pWin, XID bufId, int swapAction)
|
||||||
(*pScreen->CreatePixmap) (pScreen, pDbeWindowPriv->width,
|
(*pScreen->CreatePixmap) (pScreen, pDbeWindowPriv->width,
|
||||||
pDbeWindowPriv->height,
|
pDbeWindowPriv->height,
|
||||||
pWin->drawable.depth, 0))) {
|
pWin->drawable.depth, 0))) {
|
||||||
(*pScreen->DestroyPixmap) (pDbeWindowPriv->pFrontBuffer);
|
dixDestroyPixmap(pDbeWindowPriv->pFrontBuffer, 0);
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -426,14 +426,11 @@ miDbeWinPrivDelete(DbeWindowPrivPtr pDbeWindowPriv, XID bufId)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Destroy the front and back pixmaps. */
|
/* Destroy the front and back pixmaps. */
|
||||||
if (pDbeWindowPriv->pFrontBuffer) {
|
if (pDbeWindowPriv->pFrontBuffer)
|
||||||
(*pDbeWindowPriv->pWindow->drawable.pScreen->
|
dixDestroyPixmap(pDbeWindowPriv->pFrontBuffer, 0);
|
||||||
DestroyPixmap) (pDbeWindowPriv->pFrontBuffer);
|
|
||||||
}
|
if (pDbeWindowPriv->pBackBuffer)
|
||||||
if (pDbeWindowPriv->pBackBuffer) {
|
dixDestroyPixmap(pDbeWindowPriv->pBackBuffer, 0);
|
||||||
(*pDbeWindowPriv->pWindow->drawable.pScreen->
|
|
||||||
DestroyPixmap) (pDbeWindowPriv->pBackBuffer);
|
|
||||||
}
|
|
||||||
} /* miDbeWinPrivDelete() */
|
} /* miDbeWinPrivDelete() */
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -585,13 +582,8 @@ miDbePositionWindow(WindowPtr pWin, int x, int y)
|
||||||
if (!pFrontBuffer || !pBackBuffer) {
|
if (!pFrontBuffer || !pBackBuffer) {
|
||||||
/* We failed at creating 1 or 2 of the pixmaps. */
|
/* We failed at creating 1 or 2 of the pixmaps. */
|
||||||
|
|
||||||
if (pFrontBuffer) {
|
dixDestroyPixmap(pFrontBuffer, 0);
|
||||||
(*pScreen->DestroyPixmap) (pFrontBuffer);
|
dixDestroyPixmap(pBackBuffer, 0);
|
||||||
}
|
|
||||||
|
|
||||||
if (pBackBuffer) {
|
|
||||||
(*pScreen->DestroyPixmap) (pBackBuffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Destroy all buffers for this window. */
|
/* Destroy all buffers for this window. */
|
||||||
while (pDbeWindowPriv) {
|
while (pDbeWindowPriv) {
|
||||||
|
@ -642,8 +634,8 @@ miDbePositionWindow(WindowPtr pWin, int x, int y)
|
||||||
* pixmaps.
|
* pixmaps.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(*pScreen->DestroyPixmap) (pDbeWindowPriv->pFrontBuffer);
|
dixDestroyPixmap(pDbeWindowPriv->pFrontBuffer, 0);
|
||||||
(*pScreen->DestroyPixmap) (pDbeWindowPriv->pBackBuffer);
|
dixDestroyPixmap(pDbeWindowPriv->pBackBuffer, 0);
|
||||||
|
|
||||||
pDbeWindowPriv->pFrontBuffer = pFrontBuffer;
|
pDbeWindowPriv->pFrontBuffer = pFrontBuffer;
|
||||||
pDbeWindowPriv->pBackBuffer = pBackBuffer;
|
pDbeWindowPriv->pBackBuffer = pBackBuffer;
|
||||||
|
|
Loading…
Reference in New Issue