summaryrefslogtreecommitdiff
path: root/hw/xwin/winscrinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xwin/winscrinit.c')
-rw-r--r--hw/xwin/winscrinit.c71
1 files changed, 18 insertions, 53 deletions
diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c
index 6cbf08da4..8fe597cbd 100644
--- a/hw/xwin/winscrinit.c
+++ b/hw/xwin/winscrinit.c
@@ -38,31 +38,6 @@
#include "win.h"
#include "winmsg.h"
-#ifdef XWIN_MULTIWINDOWEXTWM
-static RootlessFrameProcsRec winMWExtWMProcs = {
- winMWExtWMCreateFrame,
- winMWExtWMDestroyFrame,
-
- winMWExtWMMoveFrame,
- winMWExtWMResizeFrame,
- winMWExtWMRestackFrame,
- winMWExtWMReshapeFrame,
- winMWExtWMUnmapFrame,
-
- winMWExtWMStartDrawing,
- winMWExtWMStopDrawing,
- winMWExtWMUpdateRegion,
- winMWExtWMDamageRects,
- winMWExtWMRootlessSwitchWindow,
- NULL, //winMWExtWMDoReorderWindow,
- NULL, //winMWExtWMHideWindow,
- NULL, //winMWExtWMUpdateColorMap,
-
- NULL, //winMWExtWMCopyBytes,
- winMWExtWMCopyWindow
-};
-#endif
-
/*
* Prototypes
*/
@@ -296,6 +271,13 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
return FALSE;
}
+#ifdef XWIN_MULTIWINDOW
+ if ((pScreenInfo->dwBPP == 8) && (pScreenInfo->fCompositeWM)) {
+ ErrorF("-compositewm disabled due to 8bpp depth\n");
+ pScreenInfo->fCompositeWM = FALSE;
+ }
+#endif
+
/* Apparently we need this for the render extension */
miSetPixmapDepths();
@@ -386,11 +368,7 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
/* Initialize the shadow framebuffer layer */
if ((pScreenInfo->dwEngine == WIN_SERVER_SHADOW_GDI
- || pScreenInfo->dwEngine == WIN_SERVER_SHADOW_DDNL)
-#ifdef XWIN_MULTIWINDOWEXTWM
- && !pScreenInfo->fMWExtWM
-#endif
- ) {
+ || pScreenInfo->dwEngine == WIN_SERVER_SHADOW_DDNL)) {
#if CYGDEBUG
winDebug("winFinishScreenInitFB - Calling shadowSetup ()\n");
#endif
@@ -405,23 +383,6 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
pScreen->CreateScreenResources = winCreateScreenResources;
}
-#ifdef XWIN_MULTIWINDOWEXTWM
- /* Handle multi-window external window manager mode */
- if (pScreenInfo->fMWExtWM) {
- winDebug("winScreenInit - MultiWindowExtWM - Calling RootlessInit\n");
-
- RootlessInit(pScreen, &winMWExtWMProcs);
-
- winDebug("winScreenInit - MultiWindowExtWM - RootlessInit returned\n");
-
- rootless_CopyBytes_threshold = 0;
- /* FIXME: How many? Profiling needed? */
- rootless_CopyWindow_threshold = 1;
-
- winWindowsWMExtensionInit();
- }
-#endif
-
/* Handle rootless mode */
if (pScreenInfo->fRootless) {
/* Define the WRAP macro temporarily for local use */
@@ -480,6 +441,7 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
WRAP(MoveWindow);
WRAP(CopyWindow);
WRAP(SetShape);
+ WRAP(ModifyPixmapHeader);
/* Assign multi-window window procedures to be top level procedures */
pScreen->CreateWindow = winCreateWindowMultiWindow;
@@ -495,6 +457,12 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
pScreen->CopyWindow = winCopyWindowMultiWindow;
pScreen->SetShape = winSetShapeMultiWindow;
+ if (pScreenInfo->fCompositeWM) {
+ pScreen->CreatePixmap = winCreatePixmapMultiwindow;
+ pScreen->DestroyPixmap = winDestroyPixmapMultiwindow;
+ pScreen->ModifyPixmapHeader = winModifyPixmapHeaderMultiwindow;
+ }
+
/* Undefine the WRAP macro, as it is not needed elsewhere */
#undef WRAP
}
@@ -525,11 +493,7 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
pScreenPriv->fServerStarted = FALSE;
#endif
-#ifdef XWIN_MULTIWINDOWEXTWM
- pScreenPriv->fRestacking = FALSE;
-#endif
-
-#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
+#ifdef XWIN_MULTIWINDOW
if (FALSE
#ifdef XWIN_MULTIWINDOW
|| pScreenInfo->fMultiWindow
@@ -545,7 +509,8 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
&pScreenPriv->ptXMsgProc,
&pScreenPriv->pmServerStarted,
pScreenInfo->dwScreen,
- (HWND) &pScreenPriv->hwndScreen)) {
+ (HWND) &pScreenPriv->hwndScreen,
+ pScreenInfo->fCompositeWM)) {
ErrorF("winFinishScreenInitFB - winInitWM () failed.\n");
return FALSE;
}