From 23b24ddd27bafa0b94b033a2a2c54e48df7f22a0 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 26 Sep 2024 17:34:54 +0200 Subject: [PATCH] (!1705) xwin: drop wrapping on ScreenRec->DestroyWindow() Instead of complicated wrapping, just call fbDestroyWindow directly. Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xwin/win.h | 1 - hw/xwin/winmultiwindowwindow.c | 4 +--- hw/xwin/winscrinit.c | 2 -- hw/xwin/winwindow.c | 4 +--- 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/hw/xwin/win.h b/hw/xwin/win.h index 44736a08b..1efc8236e 100644 --- a/hw/xwin/win.h +++ b/hw/xwin/win.h @@ -501,7 +501,6 @@ typedef struct _winPrivScreenRec { /* Window Procedures for Rootless mode */ CreateWindowProcPtr CreateWindow; - DestroyWindowProcPtr DestroyWindow; PositionWindowProcPtr PositionWindow; ChangeWindowAttributesProcPtr ChangeWindowAttributes; RealizeWindowProcPtr RealizeWindow; diff --git a/hw/xwin/winmultiwindowwindow.c b/hw/xwin/winmultiwindowwindow.c index 1765344e9..0b7019292 100644 --- a/hw/xwin/winmultiwindowwindow.c +++ b/hw/xwin/winmultiwindowwindow.c @@ -144,9 +144,7 @@ winDestroyWindowMultiWindow(WindowPtr pWin) ErrorF("winDestroyWindowMultiWindow - pWin: %p\n", pWin); #endif - WIN_UNWRAP(DestroyWindow); - fResult = (*pScreen->DestroyWindow) (pWin); - WIN_WRAP(DestroyWindow, winDestroyWindowMultiWindow); + fbDestroyWindow(pWin); /* Flag that the window has been destroyed */ pWinPriv->fXKilled = TRUE; diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c index 48d3e7a26..5e12cccb8 100644 --- a/hw/xwin/winscrinit.c +++ b/hw/xwin/winscrinit.c @@ -378,7 +378,6 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv) /* Save a pointer to each lower-level window procedure */ WRAP(CreateWindow); - WRAP(DestroyWindow); WRAP(RealizeWindow); WRAP(UnrealizeWindow); WRAP(PositionWindow); @@ -411,7 +410,6 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv) /* Save a pointer to each lower-level window procedure */ WRAP(CreateWindow); - WRAP(DestroyWindow); WRAP(RealizeWindow); WRAP(UnrealizeWindow); WRAP(PositionWindow); diff --git a/hw/xwin/winwindow.c b/hw/xwin/winwindow.c index fdcfbad44..e33176e62 100644 --- a/hw/xwin/winwindow.c +++ b/hw/xwin/winwindow.c @@ -93,9 +93,7 @@ winDestroyWindowRootless(WindowPtr pWin) winTrace("winDestroyWindowRootless (%p)\n", pWin); #endif - WIN_UNWRAP(DestroyWindow); - fResult = (*pScreen->DestroyWindow) (pWin); - WIN_WRAP(DestroyWindow, winDestroyWindowRootless); + fbDestroyWindow(pWin); if (pWinPriv->hRgn != NULL) { DeleteObject(pWinPriv->hRgn);