mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-05 04:08:02 +02:00
Fix rootless mode and multi-window mode doesn't work
This commit is contained in:
parent
6e47ed58a1
commit
0e22b9ade0
3 changed files with 50 additions and 34 deletions
|
|
@ -34,6 +34,33 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xwin/winscrinit.c,v 1.28 2003/08/07 23:47:58 alanh Exp $ */
|
||||
|
||||
#include "win.h"
|
||||
#include "safeAlpha.h"
|
||||
|
||||
|
||||
static RootlessFrameProcsRec
|
||||
winWin32RootlessProcs = {
|
||||
winWin32RootlessCreateFrame,
|
||||
winWin32RootlessDestroyFrame,
|
||||
|
||||
winWin32RootlessMoveFrame,
|
||||
winWin32RootlessResizeFrame,
|
||||
winWin32RootlessRestackFrame,
|
||||
winWin32RootlessReshapeFrame,
|
||||
winWin32RootlessUnmapFrame,
|
||||
|
||||
winWin32RootlessStartDrawing,
|
||||
winWin32RootlessStopDrawing,
|
||||
winWin32RootlessUpdateRegion,
|
||||
#ifndef ROOTLESS_TRACK_DAMAGE
|
||||
winWin32RootlessDamageRects,
|
||||
#endif
|
||||
winWin32RootlessRootlessSwitchWindow,
|
||||
|
||||
NULL,//winWin32RootlessCopyBytes,
|
||||
NULL,//winWin32RootlessFillBytes,
|
||||
NULL,//winWin32RootlessCompositePixels,
|
||||
winWin32RootlessCopyWindow
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
|
|
@ -403,9 +430,10 @@ winFinishScreenInitFB (int index,
|
|||
|
||||
#if !WIN_LAYER_SUPPORT
|
||||
/* Initialize the shadow framebuffer layer */
|
||||
if (pScreenInfo->dwEngine == WIN_SERVER_SHADOW_GDI
|
||||
if ((pScreenInfo->dwEngine == WIN_SERVER_SHADOW_GDI
|
||||
|| pScreenInfo->dwEngine == WIN_SERVER_SHADOW_DD
|
||||
|| pScreenInfo->dwEngine == WIN_SERVER_SHADOW_DDNL)
|
||||
&&(!pScreenInfo->fRootless))
|
||||
{
|
||||
#if CYGDEBUG
|
||||
ErrorF ("winFinishScreenInitFB - Calling shadowInit ()\n");
|
||||
|
|
@ -424,39 +452,22 @@ winFinishScreenInitFB (int index,
|
|||
/* Handle pseudo-rootless mode */
|
||||
if (pScreenInfo->fRootless)
|
||||
{
|
||||
/* Define the WRAP macro temporarily for local use */
|
||||
#define WRAP(a) \
|
||||
if (pScreen->a) { \
|
||||
pScreenPriv->a = pScreen->a; \
|
||||
} else { \
|
||||
ErrorF("null screen fn " #a "\n"); \
|
||||
pScreenPriv->a = NULL; \
|
||||
}
|
||||
ErrorF ("winScreenInit - RootlessInit\n");
|
||||
|
||||
/* Save a pointer to each lower-level window procedure */
|
||||
WRAP(CreateWindow);
|
||||
WRAP(DestroyWindow);
|
||||
WRAP(RealizeWindow);
|
||||
WRAP(UnrealizeWindow);
|
||||
WRAP(PositionWindow);
|
||||
WRAP(ChangeWindowAttributes);
|
||||
#ifdef SHAPE
|
||||
WRAP(SetShape);
|
||||
#endif
|
||||
RootlessInit(pScreen, &winWin32RootlessProcs);
|
||||
|
||||
/* Assign pseudo-rootless window procedures to be top level procedures */
|
||||
pScreen->CreateWindow = winCreateWindowPRootless;
|
||||
pScreen->DestroyWindow = winDestroyWindowPRootless;
|
||||
pScreen->PositionWindow = winPositionWindowPRootless;
|
||||
pScreen->ChangeWindowAttributes = winChangeWindowAttributesPRootless;
|
||||
pScreen->RealizeWindow = winMapWindowPRootless;
|
||||
pScreen->UnrealizeWindow = winUnmapWindowPRootless;
|
||||
#ifdef SHAPE
|
||||
pScreen->SetShape = winSetShapePRootless;
|
||||
#endif
|
||||
|
||||
/* Undefine the WRAP macro, as it is not needed elsewhere */
|
||||
#undef WRAP
|
||||
ErrorF ("winScreenInit - RootlessInit - done\n");
|
||||
|
||||
rootless_CopyBytes_threshold = 0;
|
||||
rootless_FillBytes_threshold = 0;
|
||||
rootless_CompositePixels_threshold = 0;
|
||||
rootless_CopyWindow_threshold = 1;/* FIXME: How many? Profiling needed? */
|
||||
|
||||
if (!winWin32RootlessInitCursor (pScreen))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
winWindowsWMExtensionInit ();
|
||||
}
|
||||
/* Handle multi window mode */
|
||||
else if (pScreenInfo->fMultiWindow)
|
||||
|
|
|
|||
|
|
@ -1177,6 +1177,8 @@ winSetEngineFunctionsShadowGDI (ScreenPtr pScreen)
|
|||
= (winCreatePrimarySurfaceProcPtr) (void (*)(void))NoopDDA;
|
||||
pScreenPriv->pwinReleasePrimarySurface
|
||||
= (winReleasePrimarySurfaceProcPtr) (void (*)(void))NoopDDA;
|
||||
pScreenPriv->pwinFinishCreateWindowsWindow =
|
||||
(winFinishCreateWindowsWindowProcPtr) (void (*)(void))NoopDDA;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,9 +41,7 @@ winWakeupHandler (int nScreen,
|
|||
unsigned long ulResult,
|
||||
pointer pReadmask)
|
||||
{
|
||||
#if 0
|
||||
winScreenPriv((ScreenPtr)pWakeupData);
|
||||
#endif
|
||||
MSG msg;
|
||||
|
||||
/* Process all messages on our queue */
|
||||
|
|
@ -57,5 +55,10 @@ winWakeupHandler (int nScreen,
|
|||
DispatchMessage (&msg);
|
||||
}
|
||||
}
|
||||
|
||||
if (pScreenPriv->pScreenInfo->fMultiWindow)
|
||||
winReorderWindowsMultiWindow ((ScreenPtr)pWakeupData);
|
||||
|
||||
if (pScreenPriv->pScreenInfo->fRootless)
|
||||
winWin32RootlessReorderWindows ((ScreenPtr)pWakeupData);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue