Xext: shm: 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:
Enrico Weigelt, metux IT consult 2024-09-30 17:49:06 +02:00
parent 7ce19233bc
commit c0f3b5bcef

View File

@ -511,7 +511,7 @@ doShmPutImage(DrawablePtr dst, GCPtr pGC,
else
(void) (*pGC->ops->CopyArea) (&pPixmap->drawable, dst, pGC, 0, 0,
sw, sh, dx, dy);
(*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap);
dixDestroyPixmap(pPixmap, 0);
}
}
@ -1001,7 +1001,7 @@ ProcPanoramiXShmCreatePixmap(ClientPtr client)
result = XaceHookResourceAccess(client, stuff->pid,
X11_RESTYPE_PIXMAP, pMap, X11_RESTYPE_NONE, NULL, DixCreateAccess);
if (result != Success) {
pDraw->pScreen->DestroyPixmap(pMap);
dixDestroyPixmap(pMap, 0);
break;
}
dixSetPrivate(&pMap->devPrivates, shmPixmapPrivateKey, shmdesc);
@ -1045,7 +1045,7 @@ fbShmCreatePixmap(ScreenPtr pScreen,
BitsPerPixel(depth),
PixmapBytePad(width, depth),
(void *) addr)) {
(*pScreen->DestroyPixmap) (pPixmap);
dixDestroyPixmap(pPixmap, 0);
return NullPixmap;
}
return pPixmap;
@ -1116,7 +1116,7 @@ ProcShmCreatePixmap(ClientPtr client)
rc = XaceHookResourceAccess(client, stuff->pid, X11_RESTYPE_PIXMAP,
pMap, X11_RESTYPE_NONE, NULL, DixCreateAccess);
if (rc != Success) {
pDraw->pScreen->DestroyPixmap(pMap);
dixDestroyPixmap(pMap, 0);
return rc;
}
dixSetPrivate(&pMap->devPrivates, shmPixmapPrivateKey, shmdesc);