randr: 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:56:38 +02:00
parent 4628254698
commit d2a93d0346

View File

@ -382,11 +382,11 @@ rrDestroySharedPixmap(RRCrtcPtr crtc, PixmapPtr pPixmap) {
*/
PixmapUnshareSecondaryPixmap(pPixmap);
primary->DestroyPixmap(pPixmap->primary_pixmap);
primary->DestroyPixmap(pPixmap->primary_pixmap);
dixDestroyPixmap(pPixmap->primary_pixmap, 0);
dixDestroyPixmap(pPixmap->primary_pixmap, 0);
}
crtc->pScreen->DestroyPixmap(pPixmap);
dixDestroyPixmap(pPixmap, 0);
}
void
@ -440,7 +440,7 @@ rrCreateSharedPixmap(RRCrtcPtr crtc, ScreenPtr primary,
spix = PixmapShareToSecondary(mpix, crtc->pScreen);
if (spix == NULL) {
primary->DestroyPixmap(mpix);
dixDestroyPixmap(mpix, 0);
return NULL;
}