xwin: drop wrapping on ScreenRec->SetShape()

Instead of complicated wrapping, just call fbSetShape() directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-09-26 20:25:46 +02:00
parent 6bcfef8cfa
commit 7e84650e52
4 changed files with 6 additions and 13 deletions

View File

@ -509,7 +509,6 @@ typedef struct _winPrivScreenRec {
ReparentWindowProcPtr ReparentWindow;
ResizeWindowProcPtr ResizeWindow;
MoveWindowProcPtr MoveWindow;
SetShapeProcPtr SetShape;
ModifyPixmapHeaderProcPtr ModifyPixmapHeader;
winCursorRec cursor;

View File

@ -33,6 +33,8 @@
#include <xwin-config.h>
#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);

View File

@ -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 */

View File

@ -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);