From c002b468a5178ce2f2703095d4ab97c37657e9d0 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 27 Sep 2024 10:54:14 +0200 Subject: [PATCH] xwin: drop wrapping on ScreenRec->CloseScreen() Instead of complicated wrapping, just call fbCloseScreen() directly. Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xwin/win.h | 2 -- hw/xwin/winscrinit.c | 1 - hw/xwin/winshadddnl.c | 4 +--- hw/xwin/winshadgdi.c | 5 +---- 4 files changed, 2 insertions(+), 10 deletions(-) diff --git a/hw/xwin/win.h b/hw/xwin/win.h index 4071bae31..65c98180e 100644 --- a/hw/xwin/win.h +++ b/hw/xwin/win.h @@ -429,8 +429,6 @@ typedef struct _winPrivScreenRec { int iConnectedClients; - CloseScreenProcPtr CloseScreen; - DWORD dwRedMask; DWORD dwGreenMask; DWORD dwBlueMask; diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c index 0fc7b9d9e..52cca3603 100644 --- a/hw/xwin/winscrinit.c +++ b/hw/xwin/winscrinit.c @@ -424,7 +424,6 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv) } /* Wrap either fb's or shadow's CloseScreen with our CloseScreen */ - pScreenPriv->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = pScreenPriv->pwinCloseScreen; /* Create a mutex for modules in separate threads to wait for */ diff --git a/hw/xwin/winshadddnl.c b/hw/xwin/winshadddnl.c index bbed6f363..d7c64e9ce 100644 --- a/hw/xwin/winshadddnl.c +++ b/hw/xwin/winshadddnl.c @@ -663,9 +663,7 @@ winCloseScreenShadowDDNL(ScreenPtr pScreen) pScreenPriv->fActive = FALSE; /* Call the wrapped CloseScreen procedure */ - WIN_UNWRAP(CloseScreen); - if (pScreen->CloseScreen) - fReturn = (*pScreen->CloseScreen) (pScreen); + fReturn = fbCloseScreen(pScreen); winFreeFBShadowDDNL(pScreen); diff --git a/hw/xwin/winshadgdi.c b/hw/xwin/winshadgdi.c index f6e50d510..66a982a8b 100644 --- a/hw/xwin/winshadgdi.c +++ b/hw/xwin/winshadgdi.c @@ -583,10 +583,7 @@ winCloseScreenShadowGDI(ScreenPtr pScreen) pScreenPriv->fClosed = TRUE; pScreenPriv->fActive = FALSE; - /* Call the wrapped CloseScreen procedure */ - WIN_UNWRAP(CloseScreen); - if (pScreen->CloseScreen) - fReturn = (*pScreen->CloseScreen) (pScreen); + fReturn = fbCloseScreen(pScreen); /* Delete the window property */ RemoveProp(pScreenPriv->hwndScreen, WIN_SCR_PROP);