From 1b990d3c0c77a236c730cefb4c23c02ffc94e8cf Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 26 Sep 2024 18:06:47 +0200 Subject: [PATCH] xwin: drop wrapping on ScreenRec->ChangeWindowAttributes() Instead of complicated wrapping, just call fbCreateWindow directly. Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xwin/win.h | 1 - hw/xwin/winmultiwindowwindow.c | 9 +-------- hw/xwin/winscrinit.c | 2 -- hw/xwin/winwindow.c | 9 +-------- 4 files changed, 2 insertions(+), 19 deletions(-) diff --git a/hw/xwin/win.h b/hw/xwin/win.h index d884e790f..9b2d171be 100644 --- a/hw/xwin/win.h +++ b/hw/xwin/win.h @@ -500,7 +500,6 @@ typedef struct _winPrivScreenRec { winCreateScreenResourcesProc pwinCreateScreenResources; /* Window Procedures for Rootless mode */ - ChangeWindowAttributesProcPtr ChangeWindowAttributes; RealizeWindowProcPtr RealizeWindow; UnrealizeWindowProcPtr UnrealizeWindow; ValidateTreeProcPtr ValidateTree; diff --git a/hw/xwin/winmultiwindowwindow.c b/hw/xwin/winmultiwindowwindow.c index 9f43b944b..87e5e2328 100644 --- a/hw/xwin/winmultiwindowwindow.c +++ b/hw/xwin/winmultiwindowwindow.c @@ -264,18 +264,11 @@ winPositionWindowMultiWindow(WindowPtr pWin, int x, int y) Bool winChangeWindowAttributesMultiWindow(WindowPtr pWin, unsigned long mask) { - Bool fResult = TRUE; - ScreenPtr pScreen = pWin->drawable.pScreen; - - winScreenPriv(pScreen); - #if ENABLE_DEBUG ErrorF("winChangeWindowAttributesMultiWindow - pWin: %p\n", pWin); #endif - WIN_UNWRAP(ChangeWindowAttributes); - fResult = (*pScreen->ChangeWindowAttributes) (pWin, mask); - WIN_WRAP(ChangeWindowAttributes, winChangeWindowAttributesMultiWindow); + Bool fResult = fbChangeWindowAttributes(pWin, mask); /* * NOTE: We do not currently need to do anything here. diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c index a4e62a6f4..f0af427e8 100644 --- a/hw/xwin/winscrinit.c +++ b/hw/xwin/winscrinit.c @@ -379,7 +379,6 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv) /* Save a pointer to each lower-level window procedure */ WRAP(RealizeWindow); WRAP(UnrealizeWindow); - WRAP(ChangeWindowAttributes); WRAP(SetShape); /* Assign rootless window procedures to be top level procedures */ @@ -409,7 +408,6 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv) /* Save a pointer to each lower-level window procedure */ WRAP(RealizeWindow); WRAP(UnrealizeWindow); - WRAP(ChangeWindowAttributes); WRAP(ReparentWindow); WRAP(RestackWindow); WRAP(ResizeWindow); diff --git a/hw/xwin/winwindow.c b/hw/xwin/winwindow.c index aab742786..0ed7a09f5 100644 --- a/hw/xwin/winwindow.c +++ b/hw/xwin/winwindow.c @@ -117,18 +117,11 @@ winPositionWindowRootless(WindowPtr pWin, int x, int y) Bool winChangeWindowAttributesRootless(WindowPtr pWin, unsigned long mask) { - Bool fResult = FALSE; - ScreenPtr pScreen = pWin->drawable.pScreen; - - winScreenPriv(pScreen); - #if ENABLE_DEBUG winTrace("winChangeWindowAttributesRootless (%p)\n", pWin); #endif - WIN_UNWRAP(ChangeWindowAttributes); - fResult = (*pScreen->ChangeWindowAttributes) (pWin, mask); - WIN_WRAP(ChangeWindowAttributes, winChangeWindowAttributesRootless); + Bool fResult = fbChangeWindowAttributes(pWin, mask); winUpdateRgnRootless(pWin);