diff options
author | marha <marha@users.sourceforge.net> | 2009-07-12 18:20:04 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-07-12 18:20:04 +0000 |
commit | da8fe31a7ba4acf109097d5696ad0145b991cdfd (patch) | |
tree | 1c74d6f075702a73e557872f2a6f020ea4eb5432 /xorg-server/hw/xwin/winscrinit.c | |
parent | 6590f805a12779909cb8504c230fa367148fe38c (diff) | |
parent | 529dcfd0858d75cb3c87c73cb0f81dd20bbb9230 (diff) | |
download | vcxsrv-da8fe31a7ba4acf109097d5696ad0145b991cdfd.tar.gz vcxsrv-da8fe31a7ba4acf109097d5696ad0145b991cdfd.tar.bz2 vcxsrv-da8fe31a7ba4acf109097d5696ad0145b991cdfd.zip |
Changes for VC compilation
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 9dc4c3da5..5cc3925c7 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 |