diff options
Diffstat (limited to 'xorg-server/hw/xwin/winscrinit.c')
-rw-r--r-- | xorg-server/hw/xwin/winscrinit.c | 55 |
1 files changed, 30 insertions, 25 deletions
diff --git a/xorg-server/hw/xwin/winscrinit.c b/xorg-server/hw/xwin/winscrinit.c index 512109500..8c208709e 100644 --- a/xorg-server/hw/xwin/winscrinit.c +++ b/xorg-server/hw/xwin/winscrinit.c @@ -37,7 +37,6 @@ #endif #include "win.h" #include "winmsg.h" -#include "safeAlpha.h" #ifdef XWIN_MULTIWINDOWEXTWM @@ -142,7 +141,7 @@ winScreenInit (int index, } /* Adjust the video mode for our engine type */ - if (!(*pScreenPriv->pwinAdjustVideoMode) (pScreen)) + if (pScreenPriv->pwinAdjustVideoMode && !(*pScreenPriv->pwinAdjustVideoMode) (pScreen)) { ErrorF ("winScreenInit - winAdjustVideoMode () failed\n"); return FALSE; @@ -176,7 +175,7 @@ winScreenInit (int index, } /* Create display window */ - if (!(*pScreenPriv->pwinCreateBoundingWindow) (pScreen)) + if (pScreenPriv->pwinCreateBoundingWindow && !(*pScreenPriv->pwinCreateBoundingWindow) (pScreen)) { ErrorF ("winScreenInit - pwinCreateBoundingWindow () " "failed\n"); @@ -227,7 +226,7 @@ winScreenInit (int index, pScreenInfo->dwBPP); /* Call the engine dependent screen initialization procedure */ - if (!((*pScreenPriv->pwinFinishScreenInit) (index, pScreen, argc, argv))) + if (pScreenPriv->pwinFinishScreenInit && !((*pScreenPriv->pwinFinishScreenInit) (index, pScreen, argc, argv))) { ErrorF ("winScreenInit - winFinishScreenInit () failed\n"); return FALSE; @@ -245,6 +244,25 @@ winScreenInit (int index, return TRUE; } +static Bool +winCreateScreenResources(ScreenPtr pScreen) +{ + winScreenPriv(pScreen); + Bool result; + + result = pScreenPriv->pwinCreateScreenResources(pScreen); + + /* Now the screen bitmap has been wrapped in a pixmap, + add that to the Shadow framebuffer */ + if (!shadowAdd(pScreen, pScreen->devPrivate, + pScreenPriv->pwinShadowUpdate, NULL, 0, 0)) + { + ErrorF ("winCreateScreenResources - shadowAdd () failed\n"); + return FALSE; + } + + return result; +} /* See Porting Layer Definition - p. 20 */ Bool @@ -360,22 +378,6 @@ winFinishScreenInitFB (int index, pScreen->blockData = pScreen; pScreen->wakeupData = pScreen; -#ifdef XWIN_MULTIWINDOWEXTWM - /* - * Setup acceleration for multi-window external window manager mode. - * To be compatible with the Damage extension, this must be done - * before calling miDCInitialize, which calls DamageSetup. - */ - if (pScreenInfo->fMWExtWM) - { - if (!RootlessAccelInit (pScreen)) - { - ErrorF ("winFinishScreenInitFB - RootlessAccelInit () failed\n"); - return FALSE; - } - } -#endif - #ifdef RENDER /* Render extension initialization, calls miPictureInit */ if (!fbPictureInit (pScreen, NULL, 0)) @@ -428,15 +430,18 @@ winFinishScreenInitFB (int index, ) { #if CYGDEBUG - winDebug ("winFinishScreenInitFB - Calling shadowInit ()\n"); + winDebug ("winFinishScreenInitFB - Calling shadowSetup ()\n"); #endif - if (!shadowInit (pScreen, - pScreenPriv->pwinShadowUpdate, - NULL)) + if (!shadowSetup(pScreen)) { - ErrorF ("winFinishScreenInitFB - shadowInit () failed\n"); + ErrorF ("winFinishScreenInitFB - shadowSetup () failed\n"); return FALSE; } + + /* 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; } #ifdef XWIN_MULTIWINDOWEXTWM |