diff --git a/Xext/xvdix.h b/Xext/xvdix.h index 38b599583..e1f33e1b4 100644 --- a/Xext/xvdix.h +++ b/Xext/xvdix.h @@ -174,7 +174,6 @@ typedef struct { int nAdaptors; XvAdaptorPtr pAdaptors; DestroyPixmapProcPtr DestroyPixmap; - CloseScreenProcPtr CloseScreen; } XvScreenRec, *XvScreenPtr; extern _X_EXPORT int XvScreenInit(ScreenPtr); diff --git a/Xext/xvmain.c b/Xext/xvmain.c index e67c655fb..c8829b1be 100644 --- a/Xext/xvmain.c +++ b/Xext/xvmain.c @@ -143,7 +143,7 @@ static void WriteSwappedVideoNotifyEvent(xvEvent *, xvEvent *); static void WriteSwappedPortNotifyEvent(xvEvent *, xvEvent *); static Bool CreateResourceTypes(void); -static Bool XvCloseScreen(ScreenPtr); +static void XvScreenClose(ScreenPtr, void *arg); static Bool XvDestroyPixmap(PixmapPtr); static void XvResetProc(ExtensionEntry *); static int XvdiDestroyGrab(void *, XID); @@ -298,33 +298,29 @@ XvScreenInit(ScreenPtr pScreen) dixSetPrivate(&pScreen->devPrivates, XvScreenKey, pxvs); pxvs->DestroyPixmap = pScreen->DestroyPixmap; - pxvs->CloseScreen = pScreen->CloseScreen; dixScreenHookWindowDestroy(pScreen, XvWindowDestroy, NULL); + dixScreenHookClose(pScreen, XvScreenClose, NULL); pScreen->DestroyPixmap = XvDestroyPixmap; - pScreen->CloseScreen = XvCloseScreen; return Success; } -static Bool -XvCloseScreen(ScreenPtr pScreen) +static void XvScreenClose(ScreenPtr pScreen, void *arg) { XvScreenPtr pxvs; pxvs = (XvScreenPtr) dixLookupPrivate(&pScreen->devPrivates, XvScreenKey); dixScreenUnhookWindowDestroy(pScreen, XvWindowDestroy, NULL); + dixScreenUnhookClose(pScreen, XvScreenClose, NULL); pScreen->DestroyPixmap = pxvs->DestroyPixmap; - pScreen->CloseScreen = pxvs->CloseScreen; free(pxvs); dixSetPrivate(&pScreen->devPrivates, XvScreenKey, NULL); - - return (*pScreen->CloseScreen) (pScreen); } static void