From 80f17eb4f4090530dfffbf1f959f849b54b8e8b8 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 27 Sep 2024 10:08:24 +0200 Subject: [PATCH] xwin: drop wrapping on ScreenRec->ReparentWindow() This proc vector is optional (callers check for non-null) and neither fb nor mi set it, so we can just assign our function directly. No need for wrapping. Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xwin/win.h | 1 - hw/xwin/winmultiwindowwindow.c | 9 --------- hw/xwin/winscrinit.c | 1 - 3 files changed, 11 deletions(-) diff --git a/hw/xwin/win.h b/hw/xwin/win.h index f9f8baa96..0b5cf120a 100644 --- a/hw/xwin/win.h +++ b/hw/xwin/win.h @@ -504,7 +504,6 @@ typedef struct _winPrivScreenRec { ClearToBackgroundProcPtr ClearToBackground; ClipNotifyProcPtr ClipNotify; RestackWindowProcPtr RestackWindow; - ReparentWindowProcPtr ReparentWindow; ResizeWindowProcPtr ResizeWindow; MoveWindowProcPtr MoveWindow; ModifyPixmapHeaderProcPtr ModifyPixmapHeader; diff --git a/hw/xwin/winmultiwindowwindow.c b/hw/xwin/winmultiwindowwindow.c index b5bab6b7c..17c03682e 100644 --- a/hw/xwin/winmultiwindowwindow.c +++ b/hw/xwin/winmultiwindowwindow.c @@ -339,21 +339,12 @@ winMapWindowMultiWindow(WindowPtr pWin) void winReparentWindowMultiWindow(WindowPtr pWin, WindowPtr pPriorParent) { - ScreenPtr pScreen = pWin->drawable.pScreen; - - winScreenPriv(pScreen); - winDebug ("winReparentMultiWindow - pWin:%p XID:0x%x, reparent from pWin:%p XID:0x%x to pWin:%p XID:0x%x\n", pWin, (unsigned int)pWin->drawable.id, pPriorParent, (unsigned int)pPriorParent->drawable.id, pWin->parent, (unsigned int)pWin->parent->drawable.id); - WIN_UNWRAP(ReparentWindow); - if (pScreen->ReparentWindow) - (*pScreen->ReparentWindow) (pWin, pPriorParent); - WIN_WRAP(ReparentWindow, winReparentWindowMultiWindow); - /* Update the Windows window associated with this X window */ winUpdateWindowsWindow(pWin); } diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c index ec38dd596..bfca9a8c4 100644 --- a/hw/xwin/winscrinit.c +++ b/hw/xwin/winscrinit.c @@ -402,7 +402,6 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv) } /* Save a pointer to each lower-level window procedure */ - WRAP(ReparentWindow); WRAP(RestackWindow); WRAP(ResizeWindow); WRAP(MoveWindow);