From 7e84650e527f7a9a54cb333e7a77e43d15fcea7a Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 26 Sep 2024 20:25:46 +0200 Subject: [PATCH] xwin: drop wrapping on ScreenRec->SetShape() Instead of complicated wrapping, just call fbSetShape() directly. Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xwin/win.h | 1 - hw/xwin/winmultiwindowshape.c | 6 +++--- hw/xwin/winscrinit.c | 2 -- hw/xwin/winwindow.c | 10 +++------- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/hw/xwin/win.h b/hw/xwin/win.h index 509a4b9d5..1ea6f3173 100644 --- a/hw/xwin/win.h +++ b/hw/xwin/win.h @@ -509,7 +509,6 @@ typedef struct _winPrivScreenRec { ReparentWindowProcPtr ReparentWindow; ResizeWindowProcPtr ResizeWindow; MoveWindowProcPtr MoveWindow; - SetShapeProcPtr SetShape; ModifyPixmapHeaderProcPtr ModifyPixmapHeader; winCursorRec cursor; diff --git a/hw/xwin/winmultiwindowshape.c b/hw/xwin/winmultiwindowshape.c index dba3202d2..9cd1df181 100644 --- a/hw/xwin/winmultiwindowshape.c +++ b/hw/xwin/winmultiwindowshape.c @@ -33,6 +33,8 @@ #include #endif +#include "mi/mi_priv.h" + #include "win.h" /* @@ -50,9 +52,7 @@ winSetShapeMultiWindow(WindowPtr pWin, int kind) ErrorF("winSetShapeMultiWindow - pWin: %p kind: %i\n", pWin, kind); #endif - WIN_UNWRAP(SetShape); - (*pScreen->SetShape) (pWin, kind); - WIN_WRAP(SetShape, winSetShapeMultiWindow); + miSetShape(pWin, kind); /* Update the Windows window's shape */ winReshapeMultiWindow(pWin); diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c index 920be7279..ccc06560a 100644 --- a/hw/xwin/winscrinit.c +++ b/hw/xwin/winscrinit.c @@ -380,7 +380,6 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv) /* Save a pointer to each lower-level window procedure */ WRAP(RealizeWindow); WRAP(UnrealizeWindow); - WRAP(SetShape); /* Assign rootless window procedures to be top level procedures */ pScreen->CreateWindow = winCreateWindowRootless; @@ -413,7 +412,6 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv) WRAP(RestackWindow); WRAP(ResizeWindow); WRAP(MoveWindow); - WRAP(SetShape); WRAP(ModifyPixmapHeader); /* Assign multi-window window procedures to be top level procedures */ diff --git a/hw/xwin/winwindow.c b/hw/xwin/winwindow.c index 0ed7a09f5..0e4a11215 100644 --- a/hw/xwin/winwindow.c +++ b/hw/xwin/winwindow.c @@ -34,6 +34,8 @@ #endif #include "win.h" +#include "mi/mi_priv.h" + /* * Prototypes for local functions */ @@ -189,17 +191,11 @@ winMapWindowRootless(WindowPtr pWin) void winSetShapeRootless(WindowPtr pWin, int kind) { - ScreenPtr pScreen = pWin->drawable.pScreen; - - winScreenPriv(pScreen); - #if ENABLE_DEBUG winTrace("winSetShapeRootless (%p, %i)\n", pWin, kind); #endif - WIN_UNWRAP(SetShape); - (*pScreen->SetShape) (pWin, kind); - WIN_WRAP(SetShape, winSetShapeRootless); + miSetShape(pWin, kind); winReshapeRootless(pWin); winUpdateRgnRootless(pWin);