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, int type,
XID glxDrawId, __GLXconfig * conf); XID glxDrawId, __GLXconfig * conf);
static Bool glxWinRealizeWindow(WindowPtr pWin);
static Bool glxWinUnrealizeWindow(WindowPtr pWin);
static void glxWinCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, static void glxWinCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg,
RegionPtr prgnSrc); RegionPtr prgnSrc);
static Bool glxWinSetPixelFormat(HDC hdc, int bppOverride, int drawableTypeOverride, 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 // dump out fbConfigs now fbConfigIds and visualIDs have been assigned
fbConfigsDump(screen->base.numFBConfigs, screen->base.fbconfigs, &rejects); fbConfigsDump(screen->base.numFBConfigs, screen->base.fbconfigs, &rejects);
/* Wrap RealizeWindow, UnrealizeWindow and CopyWindow on this screen */ /* Wrap CopyWindow on this screen */
screen->RealizeWindow = pScreen->RealizeWindow;
pScreen->RealizeWindow = glxWinRealizeWindow;
screen->UnrealizeWindow = pScreen->UnrealizeWindow;
pScreen->UnrealizeWindow = glxWinUnrealizeWindow;
screen->CopyWindow = pScreen->CopyWindow; screen->CopyWindow = pScreen->CopyWindow;
pScreen->CopyWindow = glxWinCopyWindow; pScreen->CopyWindow = glxWinCopyWindow;
@ -730,23 +724,6 @@ glxWinScreenProbe(ScreenPtr pScreen)
* Window functions * 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 static void
glxWinCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) glxWinCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
{ {
@ -778,22 +755,6 @@ glxWinCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
pScreen->CopyWindow = glxWinCopyWindow; 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 * Drawable functions

View File

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

View File

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

View File

@ -33,6 +33,8 @@
#include <xwin-config.h> #include <xwin-config.h>
#endif #endif
#include "mi/mi_priv.h"
#include "win.h" #include "win.h"
/* /*
@ -50,9 +52,7 @@ winSetShapeMultiWindow(WindowPtr pWin, int kind)
ErrorF("winSetShapeMultiWindow - pWin: %p kind: %i\n", pWin, kind); ErrorF("winSetShapeMultiWindow - pWin: %p kind: %i\n", pWin, kind);
#endif #endif
WIN_UNWRAP(SetShape); miSetShape(pWin, kind);
(*pScreen->SetShape) (pWin, kind);
WIN_WRAP(SetShape, winSetShapeMultiWindow);
/* Update the Windows window's shape */ /* Update the Windows window's shape */
winReshapeMultiWindow(pWin); winReshapeMultiWindow(pWin);

View File

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

View File

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

View File

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

View File

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

View File

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