Compare commits

...

17 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult f92754e3f7 xwin: call miCreateScreenResources() directly
No need for complicated wrapping/unwrapping: it's always just
miCreateResources() anyway - so we can call it directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-05-02 18:45:28 +02:00
Enrico Weigelt, metux IT consult 94f6355d76 xwin: drop wrapping on ScreenRec->ModifyPixmapHeader()
Instead of complicated wrapping, just call fbModifyPixmapHeader() directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-05-02 18:45:28 +02:00
Enrico Weigelt, metux IT consult 36ec20c4bd xwin: drop winResizeWindowMultiWindow()
This wrapping function for Screen->ResizeWindow() is does nothing more than
just call the original functions. So no need to keep wrapping it at all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-05-02 18:45:28 +02:00
Enrico Weigelt, metux IT consult 6ab0e0ae02 xwin: drop wrapping on ScreenRec->MoveWindow()
Instead of complicated wrapping, just call fbMoveWindow() directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-05-02 18:45:28 +02:00
Enrico Weigelt, metux IT consult a4977c1a59 xwin: drop wrapping on ScreenRec->RestackWindow()
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 <info@metux.net>
2025-05-02 18:45:28 +02:00
Enrico Weigelt, metux IT consult 80f17eb4f4 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 <info@metux.net>
2025-05-02 18:45:28 +02:00
Enrico Weigelt, metux IT consult c4d90fe3f8 xwin: drop wrapping on ScreenRec->UnrealizeWindow()
Instead of complicated wrapping, just call fbUnrealizeWindow() directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-05-02 18:45:28 +02:00
Enrico Weigelt, metux IT consult 7dbe01afbb xwin: drop wrapping on ScreenRec->RealizeWindow()
Instead of complicated wrapping, just call fbRealizeWindow() directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-05-02 18:45:28 +02:00
Enrico Weigelt, metux IT consult aa53329115 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>
2025-05-02 18:45:26 +02:00
Enrico Weigelt, metux IT consult e796875a69 xwin: drop winCopyWindowMultiWindow()
This wrapping function for Screen->CopyWindow() is does nothing more than
just call the original functions. So no need to keep wrapping it at all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-05-02 18:42:00 +02:00
Enrico Weigelt, metux IT consult 03deb34f41 xwin: call winFinishScreenInitFB() directly
Both engines, GDI as well as DirectDraw, using the same screen init finish function,
so no need to keep indirection via per-engine callback pointer.

The winFinishScreenInitFB() can also be made static now.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-05-02 18:42:00 +02:00
Enrico Weigelt, metux IT consult c641673992 xwin: glx: drop glxWinUnrealizeWindow()
It does nothing more than just calling the original/wrapped function,
so we don't need that at all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-05-02 18:42:00 +02:00
Enrico Weigelt, metux IT consult 6f10c48a04 xwin: glx: drop glxWinRealizeWindow()
It does nothing more than just calling the original/wrapped function,
so we don't need that at all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-05-02 18:42:00 +02:00
Enrico Weigelt, metux IT consult f56bb3723a xwin: drop wrapping on ScreenRec->ChangeWindowAttributes()
Instead of complicated wrapping, just call fbCreateWindow directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-05-02 18:42:00 +02:00
Enrico Weigelt, metux IT consult 75e953cb5e xwin: drop wrapping on ScreenRec->CreateWindow()
Instead of complicated wrapping, just call fbCreateWindow directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-05-02 18:42:00 +02:00
Enrico Weigelt, metux IT consult ecda147295 xwin: drop wrapping on ScreenRec->PositionWindow()
Instead of complicated wrapping, just call fbPositionWindow directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-05-02 18:41:54 +02:00
Enrico Weigelt, metux IT consult e2af5a79d1 xwin: drop wrapping on ScreenRec->DestroyWindow()
Instead of complicated wrapping, just call fbDestroyWindow directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-05-02 18:18:18 +02:00
9 changed files with 32 additions and 273 deletions

View File

@ -373,8 +373,6 @@ static __GLXdrawable *glxWinCreateDrawable(ClientPtr client,
int type,
XID glxDrawId, __GLXconfig * conf);
static Bool glxWinRealizeWindow(WindowPtr pWin);
static Bool glxWinUnrealizeWindow(WindowPtr pWin);
static void glxWinCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg,
RegionPtr prgnSrc);
static Bool glxWinSetPixelFormat(HDC hdc, int bppOverride, int drawableTypeOverride,
@ -704,11 +702,7 @@ glxWinScreenProbe(ScreenPtr pScreen)
// dump out fbConfigs now fbConfigIds and visualIDs have been assigned
fbConfigsDump(screen->base.numFBConfigs, screen->base.fbconfigs, &rejects);
/* Wrap RealizeWindow, UnrealizeWindow and CopyWindow on this screen */
screen->RealizeWindow = pScreen->RealizeWindow;
pScreen->RealizeWindow = glxWinRealizeWindow;
screen->UnrealizeWindow = pScreen->UnrealizeWindow;
pScreen->UnrealizeWindow = glxWinUnrealizeWindow;
/* Wrap CopyWindow on this screen */
screen->CopyWindow = pScreen->CopyWindow;
pScreen->CopyWindow = glxWinCopyWindow;
@ -730,23 +724,6 @@ glxWinScreenProbe(ScreenPtr pScreen)
* Window functions
*/
static Bool
glxWinRealizeWindow(WindowPtr pWin)
{
Bool result;
ScreenPtr pScreen = pWin->drawable.pScreen;
glxWinScreen *screenPriv = (glxWinScreen *) glxGetScreen(pScreen);
GLWIN_DEBUG_MSG("glxWinRealizeWindow");
/* Allow the window to be created (RootlessRealizeWindow is inside our wrap) */
pScreen->RealizeWindow = screenPriv->RealizeWindow;
result = pScreen->RealizeWindow(pWin);
pScreen->RealizeWindow = glxWinRealizeWindow;
return result;
}
static void
glxWinCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
{
@ -778,22 +755,6 @@ glxWinCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
pScreen->CopyWindow = glxWinCopyWindow;
}
static Bool
glxWinUnrealizeWindow(WindowPtr pWin)
{
Bool result;
ScreenPtr pScreen = pWin->drawable.pScreen;
glxWinScreen *screenPriv = (glxWinScreen *) glxGetScreen(pScreen);
GLWIN_DEBUG_MSG("glxWinUnrealizeWindow");
pScreen->UnrealizeWindow = screenPriv->UnrealizeWindow;
result = pScreen->UnrealizeWindow(pWin);
pScreen->UnrealizeWindow = glxWinUnrealizeWindow;
return result;
}
/* ---------------------------------------------------------------------- */
/*
* Drawable functions

View File

@ -72,8 +72,6 @@ struct __GLXWinScreen {
Bool has_WGL_ARB_framebuffer_sRGB;
/* wrapped screen functions */
RealizeWindowProcPtr RealizeWindow;
UnrealizeWindowProcPtr UnrealizeWindow;
CopyWindowProcPtr CopyWindow;
};

View File

@ -291,8 +291,6 @@ typedef Bool (*winCreatePrimarySurfaceProcPtr) (ScreenPtr);
typedef Bool (*winReleasePrimarySurfaceProcPtr) (ScreenPtr);
typedef Bool (*winCreateScreenResourcesProc) (ScreenPtr);
/*
* Pixmap privates
*/
@ -485,7 +483,6 @@ typedef struct _winPrivScreenRec {
winInitVisualsProcPtr pwinInitVisuals;
winAdjustVideoModeProcPtr pwinAdjustVideoMode;
winCreateBoundingWindowProcPtr pwinCreateBoundingWindow;
winFinishScreenInitProcPtr pwinFinishScreenInit;
winBltExposedRegionsProcPtr pwinBltExposedRegions;
winBltExposedWindowRegionProcPtr pwinBltExposedWindowRegion;
winActivateAppProcPtr pwinActivateApp;
@ -497,26 +494,12 @@ typedef struct _winPrivScreenRec {
winDestroyColormapProcPtr pwinDestroyColormap;
winCreatePrimarySurfaceProcPtr pwinCreatePrimarySurface;
winReleasePrimarySurfaceProcPtr pwinReleasePrimarySurface;
winCreateScreenResourcesProc pwinCreateScreenResources;
/* Window Procedures for Rootless mode */
CreateWindowProcPtr CreateWindow;
DestroyWindowProcPtr DestroyWindow;
PositionWindowProcPtr PositionWindow;
ChangeWindowAttributesProcPtr ChangeWindowAttributes;
RealizeWindowProcPtr RealizeWindow;
UnrealizeWindowProcPtr UnrealizeWindow;
ValidateTreeProcPtr ValidateTree;
PostValidateTreeProcPtr PostValidateTree;
CopyWindowProcPtr CopyWindow;
ClearToBackgroundProcPtr ClearToBackground;
ClipNotifyProcPtr ClipNotify;
RestackWindowProcPtr RestackWindow;
ReparentWindowProcPtr ReparentWindow;
ResizeWindowProcPtr ResizeWindow;
MoveWindowProcPtr MoveWindow;
SetShapeProcPtr SetShape;
ModifyPixmapHeaderProcPtr ModifyPixmapHeader;
winCursorRec cursor;
@ -831,9 +814,6 @@ void
Bool
winScreenInit(ScreenPtr pScreen, int argc, char **argv);
Bool
winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv);
/*
* winshadddnl.c
*/
@ -925,19 +905,9 @@ void
winReorderWindowsMultiWindow(void);
void
winResizeWindowMultiWindow(WindowPtr pWin, int x, int y, unsigned int w,
unsigned int h, WindowPtr pSib);
void
winMoveWindowMultiWindow(WindowPtr pWin, int x, int y,
WindowPtr pSib, VTKind kind);
void
winCopyWindowMultiWindow(WindowPtr pWin, DDXPointRec oldpt,
RegionPtr oldRegion);
PixmapPtr
winCreatePixmapMultiwindow(ScreenPtr pScreen, int width, int height, int depth,
unsigned usage_hint);

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

@ -36,6 +36,8 @@
#include <xwin-config.h>
#endif
#include "mi/mi_priv.h"
#include "win.h"
#include "dixevents.h"
#include "winmultiwindowclass.h"
@ -99,19 +101,13 @@ winInitMultiWindowClass(void)
Bool
winCreateWindowMultiWindow(WindowPtr pWin)
{
Bool fResult = TRUE;
ScreenPtr pScreen = pWin->drawable.pScreen;
winWindowPriv(pWin);
winScreenPriv(pScreen);
#if ENABLE_DEBUG
winTrace("winCreateWindowMultiWindow - pWin: %p\n", pWin);
#endif
WIN_UNWRAP(CreateWindow);
fResult = (*pScreen->CreateWindow) (pWin);
WIN_WRAP(CreateWindow, winCreateWindowMultiWindow);
Bool fResult = fbCreateWindow(pWin);
/* Initialize some privates values */
pWinPriv->hRgn = NULL;
@ -132,19 +128,13 @@ winCreateWindowMultiWindow(WindowPtr pWin)
Bool
winDestroyWindowMultiWindow(WindowPtr pWin)
{
Bool fResult = TRUE;
ScreenPtr pScreen = pWin->drawable.pScreen;
winWindowPriv(pWin);
winScreenPriv(pScreen);
#if ENABLE_DEBUG
ErrorF("winDestroyWindowMultiWindow - pWin: %p\n", pWin);
#endif
WIN_UNWRAP(DestroyWindow);
fResult = (*pScreen->DestroyWindow) (pWin);
WIN_WRAP(DestroyWindow, winDestroyWindowMultiWindow);
Bool fResult = fbDestroyWindow(pWin);
/* Flag that the window has been destroyed */
pWinPriv->fXKilled = TRUE;
@ -166,12 +156,9 @@ winDestroyWindowMultiWindow(WindowPtr pWin)
Bool
winPositionWindowMultiWindow(WindowPtr pWin, int x, int y)
{
Bool fResult = TRUE;
int iX, iY, iWidth, iHeight;
ScreenPtr pScreen = pWin->drawable.pScreen;
winWindowPriv(pWin);
winScreenPriv(pScreen);
HWND hWnd = pWinPriv->hWnd;
RECT rcNew;
@ -188,9 +175,7 @@ winPositionWindowMultiWindow(WindowPtr pWin, int x, int y)
winTrace("winPositionWindowMultiWindow - pWin: %p\n", pWin);
#endif
WIN_UNWRAP(PositionWindow);
fResult = (*pScreen->PositionWindow) (pWin, x, y);
WIN_WRAP(PositionWindow, winPositionWindowMultiWindow);
Bool fResult = fbPositionWindow(pWin, x, y);
#if ENABLE_DEBUG
ErrorF("winPositionWindowMultiWindow: (x, y) = (%d, %d)\n", x, y);
@ -282,18 +267,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.
@ -310,19 +288,13 @@ winChangeWindowAttributesMultiWindow(WindowPtr pWin, unsigned long mask)
Bool
winUnmapWindowMultiWindow(WindowPtr pWin)
{
Bool fResult = TRUE;
ScreenPtr pScreen = pWin->drawable.pScreen;
winWindowPriv(pWin);
winScreenPriv(pScreen);
#if ENABLE_DEBUG
ErrorF("winUnmapWindowMultiWindow - pWin: %p\n", pWin);
#endif
WIN_UNWRAP(UnrealizeWindow);
fResult = (*pScreen->UnrealizeWindow) (pWin);
WIN_WRAP(UnrealizeWindow, winUnmapWindowMultiWindow);
Bool fResult = fbUnrealizeWindow(pWin);
/* Flag that the window has been killed */
pWinPriv->fXKilled = TRUE;
@ -341,19 +313,13 @@ winUnmapWindowMultiWindow(WindowPtr pWin)
Bool
winMapWindowMultiWindow(WindowPtr pWin)
{
Bool fResult = TRUE;
ScreenPtr pScreen = pWin->drawable.pScreen;
winWindowPriv(pWin);
winScreenPriv(pScreen);
#if ENABLE_DEBUG
ErrorF("winMapWindowMultiWindow - pWin: %p\n", pWin);
#endif
WIN_UNWRAP(RealizeWindow);
fResult = (*pScreen->RealizeWindow) (pWin);
WIN_WRAP(RealizeWindow, winMapWindowMultiWindow);
Bool fResult = fbRealizeWindow(pWin);
/* Flag that this window has not been destroyed */
pWinPriv->fXKilled = FALSE;
@ -375,21 +341,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);
}
@ -407,19 +364,11 @@ winRestackWindowMultiWindow(WindowPtr pWin, WindowPtr pOldNextSib)
HWND hInsertAfter;
HWND hWnd = NULL;
#endif
ScreenPtr pScreen = pWin->drawable.pScreen;
winScreenPriv(pScreen);
#if ENABLE_DEBUG || ENABLE_DEBUG
winTrace("winRestackMultiWindow - %p\n", pWin);
#endif
WIN_UNWRAP(RestackWindow);
if (pScreen->RestackWindow)
(*pScreen->RestackWindow) (pWin, pOldNextSib);
WIN_WRAP(RestackWindow, winRestackWindowMultiWindow);
#if 1
/*
* Calling winReorderWindowsMultiWindow here means our window manager
@ -799,24 +748,6 @@ winReorderWindowsMultiWindow(void)
fRestacking = FALSE;
}
/*
* CopyWindow - See Porting Layer Definition - p. 39
*/
void
winCopyWindowMultiWindow(WindowPtr pWin, DDXPointRec oldpt, RegionPtr oldRegion)
{
ScreenPtr pScreen = pWin->drawable.pScreen;
winScreenPriv(pScreen);
#if ENABLE_DEBUG
ErrorF("CopyWindowMultiWindow\n");
#endif
WIN_UNWRAP(CopyWindow);
(*pScreen->CopyWindow) (pWin, oldpt, oldRegion);
WIN_WRAP(CopyWindow, winCopyWindowMultiWindow);
}
/*
* MoveWindow - See Porting Layer Definition - p. 42
*/
@ -824,36 +755,11 @@ void
winMoveWindowMultiWindow(WindowPtr pWin, int x, int y,
WindowPtr pSib, VTKind kind)
{
ScreenPtr pScreen = pWin->drawable.pScreen;
winScreenPriv(pScreen);
#if ENABLE_DEBUG
ErrorF("MoveWindowMultiWindow to (%d, %d)\n", x, y);
#endif
WIN_UNWRAP(MoveWindow);
(*pScreen->MoveWindow) (pWin, x, y, pSib, kind);
WIN_WRAP(MoveWindow, winMoveWindowMultiWindow);
}
/*
* ResizeWindow - See Porting Layer Definition - p. 42
*/
void
winResizeWindowMultiWindow(WindowPtr pWin, int x, int y, unsigned int w,
unsigned int h, WindowPtr pSib)
{
ScreenPtr pScreen = pWin->drawable.pScreen;
winScreenPriv(pScreen);
#if ENABLE_DEBUG
ErrorF("ResizeWindowMultiWindow to (%d, %d) - %dx%d\n", x, y, w, h);
#endif
WIN_UNWRAP(ResizeWindow);
(*pScreen->ResizeWindow) (pWin, x, y, w, h, pSib);
WIN_WRAP(ResizeWindow, winResizeWindowMultiWindow);
miMoveWindow(pWin, x, y, pSib, kind);
}
/*
@ -1153,7 +1059,6 @@ winModifyPixmapHeaderMultiwindow(PixmapPtr pPixmap,
{
int i;
winPrivPixmapPtr pPixmapPriv = winGetPixmapPriv(pPixmap);
Bool fResult;
/* reinitialize everything */
pPixmap->drawable.depth = depth;
@ -1204,13 +1109,5 @@ winModifyPixmapHeaderMultiwindow(PixmapPtr pPixmap,
winDebug("winModifyPixmapHeaderMultiwindow: falling back\n");
{
ScreenPtr pScreen = pPixmap->drawable.pScreen;
winScreenPriv(pScreen);
WIN_UNWRAP(ModifyPixmapHeader);
fResult = (*pScreen->ModifyPixmapHeader) (pPixmap, width, height, depth, bitsPerPixel, devKind, pPixData);
WIN_WRAP(ModifyPixmapHeader, winModifyPixmapHeaderMultiwindow);
}
return fResult;
return miModifyPixmapHeader(pPixmap, width, height, depth, bitsPerPixel, devKind, pPixData);
}

View File

@ -35,9 +35,14 @@
#ifdef HAVE_XWIN_CONFIG_H
#include <xwin-config.h>
#endif
#include "mi/mi_priv.h"
#include "win.h"
#include "winmsg.h"
static Bool winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv);
/*
* Determine what type of screen we are initializing
* and call the appropriate procedure to initialize
@ -165,9 +170,8 @@ winScreenInit(ScreenPtr pScreen, int argc, char **argv)
/* Clear the visuals list */
miClearVisualTypes();
/* Call the engine dependent screen initialization procedure */
if (!((*pScreenPriv->pwinFinishScreenInit) (pScreen->myNum, pScreen, argc, argv))) {
ErrorF("winScreenInit - winFinishScreenInit () failed\n");
if (!winFinishScreenInitFB(pScreen->myNum, pScreen, argc, argv)) {
ErrorF("%s(): winFinishScreenInitFB () failed\n", __FUNCTION__);
/* call the engine dependent screen close procedure to clean up from a failure */
pScreenPriv->pwinCloseScreen(pScreen);
@ -205,9 +209,8 @@ static Bool
winCreateScreenResources(ScreenPtr pScreen)
{
winScreenPriv(pScreen);
Bool result;
result = pScreenPriv->pwinCreateScreenResources(pScreen);
Bool result = miCreateScreenResources(pScreen);
/* Now the screen bitmap has been wrapped in a pixmap,
add that to the Shadow framebuffer */
@ -221,7 +224,7 @@ winCreateScreenResources(ScreenPtr pScreen)
}
/* See Porting Layer Definition - p. 20 */
Bool
static Bool
winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
{
winScreenPriv(pScreen);
@ -361,7 +364,6 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
/* Wrap CreateScreenResources so we can add the screen pixmap
to the Shadow framebuffer after it's been created */
pScreenPriv->pwinCreateScreenResources = pScreen->CreateScreenResources;
pScreen->CreateScreenResources = winCreateScreenResources;
}
@ -376,15 +378,6 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
pScreenPriv->a = NULL; \
}
/* Save a pointer to each lower-level window procedure */
WRAP(CreateWindow);
WRAP(DestroyWindow);
WRAP(RealizeWindow);
WRAP(UnrealizeWindow);
WRAP(PositionWindow);
WRAP(ChangeWindowAttributes);
WRAP(SetShape);
/* Assign rootless window procedures to be top level procedures */
pScreen->CreateWindow = winCreateWindowRootless;
pScreen->DestroyWindow = winDestroyWindowRootless;
@ -409,21 +402,6 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
pScreenPriv->a = NULL; \
}
/* Save a pointer to each lower-level window procedure */
WRAP(CreateWindow);
WRAP(DestroyWindow);
WRAP(RealizeWindow);
WRAP(UnrealizeWindow);
WRAP(PositionWindow);
WRAP(ChangeWindowAttributes);
WRAP(ReparentWindow);
WRAP(RestackWindow);
WRAP(ResizeWindow);
WRAP(MoveWindow);
WRAP(CopyWindow);
WRAP(SetShape);
WRAP(ModifyPixmapHeader);
/* Assign multi-window window procedures to be top level procedures */
pScreen->CreateWindow = winCreateWindowMultiWindow;
pScreen->DestroyWindow = winDestroyWindowMultiWindow;
@ -433,9 +411,7 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
pScreen->UnrealizeWindow = winUnmapWindowMultiWindow;
pScreen->ReparentWindow = winReparentWindowMultiWindow;
pScreen->RestackWindow = winRestackWindowMultiWindow;
pScreen->ResizeWindow = winResizeWindowMultiWindow;
pScreen->MoveWindow = winMoveWindowMultiWindow;
pScreen->CopyWindow = winCopyWindowMultiWindow;
pScreen->SetShape = winSetShapeMultiWindow;
if (pScreenInfo->fCompositeWM) {

View File

@ -1193,7 +1193,6 @@ winSetEngineFunctionsShadowDDNL(ScreenPtr pScreen)
winCreateBoundingWindowFullScreen;
else
pScreenPriv->pwinCreateBoundingWindow = winCreateBoundingWindowWindowed;
pScreenPriv->pwinFinishScreenInit = winFinishScreenInitFB;
pScreenPriv->pwinBltExposedRegions = winBltExposedRegionsShadowDDNL;
pScreenPriv->pwinBltExposedWindowRegion = NULL;
pScreenPriv->pwinActivateApp = winActivateAppShadowDDNL;

View File

@ -1265,7 +1265,6 @@ winSetEngineFunctionsShadowGDI(ScreenPtr pScreen)
winCreateBoundingWindowFullScreen;
else
pScreenPriv->pwinCreateBoundingWindow = winCreateBoundingWindowWindowed;
pScreenPriv->pwinFinishScreenInit = winFinishScreenInitFB;
pScreenPriv->pwinBltExposedRegions = winBltExposedRegionsShadowGDI;
pScreenPriv->pwinBltExposedWindowRegion = winBltExposedWindowRegionShadowGDI;
pScreenPriv->pwinActivateApp = winActivateAppShadowGDI;

View File

@ -34,6 +34,8 @@
#endif
#include "win.h"
#include "mi/mi_priv.h"
/*
* Prototypes for local functions
*/
@ -56,18 +58,14 @@ Bool
winCreateWindowRootless(WindowPtr pWin)
{
Bool fResult = FALSE;
ScreenPtr pScreen = pWin->drawable.pScreen;
winWindowPriv(pWin);
winScreenPriv(pScreen);
#if ENABLE_DEBUG
winTrace("winCreateWindowRootless (%p)\n", pWin);
#endif
WIN_UNWRAP(CreateWindow);
fResult = (*pScreen->CreateWindow) (pWin);
WIN_WRAP(CreateWindow, winCreateWindowRootless);
fResult = fbCreateWindow(pWin);
pWinPriv->hRgn = NULL;
@ -80,19 +78,13 @@ winCreateWindowRootless(WindowPtr pWin)
Bool
winDestroyWindowRootless(WindowPtr pWin)
{
Bool fResult = FALSE;
ScreenPtr pScreen = pWin->drawable.pScreen;
winWindowPriv(pWin);
winScreenPriv(pScreen);
#if ENABLE_DEBUG
winTrace("winDestroyWindowRootless (%p)\n", pWin);
#endif
WIN_UNWRAP(DestroyWindow);
fResult = (*pScreen->DestroyWindow) (pWin);
WIN_WRAP(DestroyWindow, winDestroyWindowRootless);
Bool fResult = fbDestroyWindow(pWin);
if (pWinPriv->hRgn != NULL) {
DeleteObject(pWinPriv->hRgn);
@ -110,18 +102,11 @@ winDestroyWindowRootless(WindowPtr pWin)
Bool
winPositionWindowRootless(WindowPtr pWin, int x, int y)
{
Bool fResult = FALSE;
ScreenPtr pScreen = pWin->drawable.pScreen;
winScreenPriv(pScreen);
#if ENABLE_DEBUG
winTrace("winPositionWindowRootless (%p)\n", pWin);
#endif
WIN_UNWRAP(PositionWindow);
fResult = (*pScreen->PositionWindow) (pWin, x, y);
WIN_WRAP(PositionWindow, winPositionWindowRootless);
Bool fResult = fbPositionWindow(pWin, x, y);
winUpdateRgnRootless(pWin);
@ -134,18 +119,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);
@ -159,19 +137,13 @@ winChangeWindowAttributesRootless(WindowPtr pWin, unsigned long mask)
Bool
winUnmapWindowRootless(WindowPtr pWin)
{
Bool fResult = FALSE;
ScreenPtr pScreen = pWin->drawable.pScreen;
winWindowPriv(pWin);
winScreenPriv(pScreen);
#if ENABLE_DEBUG
winTrace("winUnmapWindowRootless (%p)\n", pWin);
#endif
WIN_UNWRAP(UnrealizeWindow);
fResult = (*pScreen->UnrealizeWindow) (pWin);
WIN_WRAP(UnrealizeWindow, winUnmapWindowRootless);
Bool fResult = fbUnrealizeWindow(pWin);
if (pWinPriv->hRgn != NULL) {
DeleteObject(pWinPriv->hRgn);
@ -190,18 +162,11 @@ winUnmapWindowRootless(WindowPtr pWin)
Bool
winMapWindowRootless(WindowPtr pWin)
{
Bool fResult = FALSE;
ScreenPtr pScreen = pWin->drawable.pScreen;
winScreenPriv(pScreen);
#if ENABLE_DEBUG
winTrace("winMapWindowRootless (%p)\n", pWin);
#endif
WIN_UNWRAP(RealizeWindow);
fResult = (*pScreen->RealizeWindow) (pWin);
WIN_WRAP(RealizeWindow, winMapWindowRootless);
Bool fResult = fbRealizeWindow(pWin);
winReshapeRootless(pWin);
@ -213,17 +178,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);