diff options
Diffstat (limited to 'xorg-server/hw/xwin/winscrinit.c')
-rwxr-xr-x[-rw-r--r--] | xorg-server/hw/xwin/winscrinit.c | 49 |
1 files changed, 18 insertions, 31 deletions
diff --git a/xorg-server/hw/xwin/winscrinit.c b/xorg-server/hw/xwin/winscrinit.c index ce0aada31..9f106f77c 100644..100755 --- a/xorg-server/hw/xwin/winscrinit.c +++ b/xorg-server/hw/xwin/winscrinit.c @@ -88,10 +88,8 @@ winScreenInit(ScreenPtr pScreen, int argc, char **argv) HDC hdc; DWORD dwInitialBPP; -#if CYGDEBUG || YES winDebug("winScreenInit - dwWidth: %ld dwHeight: %ld\n", pScreenInfo->dwWidth, pScreenInfo->dwHeight); -#endif /* Allocate privates for this screen */ if (!winAllocatePrivates(pScreen)) { @@ -122,27 +120,27 @@ winScreenInit(ScreenPtr pScreen, int argc, char **argv) /* Horribly misnamed function: Allow engine to adjust BPP for screen */ dwInitialBPP = pScreenInfo->dwBPP; - - if (!(*pScreenPriv->pwinAdjustVideoMode) (pScreen)) { + + if (pScreenPriv->pwinAdjustVideoMode && !(*pScreenPriv->pwinAdjustVideoMode) (pScreen)) { ErrorF("winScreenInit - winAdjustVideoMode () failed\n"); return FALSE; } if (dwInitialBPP == WIN_DEFAULT_BPP) { /* No -depth parameter was passed, let the user know the depth being used */ - ErrorF + winDebug ("winScreenInit - Using Windows display depth of %d bits per pixel\n", (int) pScreenInfo->dwBPP); } else if (dwInitialBPP != pScreenInfo->dwBPP) { /* Warn user if engine forced a depth different to -depth parameter */ - ErrorF + winDebug ("winScreenInit - Command line depth of %d bpp overidden by engine, using %d bpp\n", (int) dwInitialBPP, (int) pScreenInfo->dwBPP); } else { - ErrorF("winScreenInit - Using command line depth of %d bpp\n", - (int) pScreenInfo->dwBPP); + winDebug("winScreenInit - Using command line depth of %d bpp\n", + (int) pScreenInfo->dwBPP); } /* Check for supported display depth */ @@ -175,7 +173,7 @@ winScreenInit(ScreenPtr pScreen, int argc, char **argv) } /* Create display window */ - if (!(*pScreenPriv->pwinCreateBoundingWindow) (pScreen)) { + if (pScreenPriv->pwinCreateBoundingWindow && !(*pScreenPriv->pwinCreateBoundingWindow) (pScreen)) { ErrorF("winScreenInit - pwinCreateBoundingWindow () " "failed\n"); return FALSE; } @@ -202,7 +200,7 @@ winScreenInit(ScreenPtr pScreen, int argc, char **argv) miClearVisualTypes(); /* Call the engine dependent screen initialization procedure */ - if (!((*pScreenPriv->pwinFinishScreenInit) (pScreen->myNum, pScreen, argc, argv))) { + if (pScreenPriv->pwinFinishScreenInit && !((*pScreenPriv->pwinFinishScreenInit) (pScreen->myNum, pScreen, argc, argv))) { ErrorF("winScreenInit - winFinishScreenInit () failed\n"); /* call the engine dependent screen close procedure to clean up from a failure */ @@ -213,8 +211,10 @@ winScreenInit(ScreenPtr pScreen, int argc, char **argv) if (!g_fSoftwareCursor) winInitCursor(pScreen); +#ifdef WINDBG else - winErrorFVerb(2, "winScreenInit - Using software cursor\n"); + winDebug("winScreenInit - Using software cursor\n"); +#endif /* Note the screen origin in a normalized coordinate space where (0,0) is at the top left @@ -223,12 +223,9 @@ winScreenInit(ScreenPtr pScreen, int argc, char **argv) pScreen->x = pScreenInfo->dwInitialX - GetSystemMetrics(SM_XVIRTUALSCREEN); pScreen->y = pScreenInfo->dwInitialY - GetSystemMetrics(SM_YVIRTUALSCREEN); - ErrorF("Screen %d added at virtual desktop coordinate (%d,%d).\n", + winDebug("Screen %d added at virtual desktop coordinate (%d,%d).\n", pScreen->myNum, pScreen->x, pScreen->y); - -#if CYGDEBUG || YES winDebug("winScreenInit - returning\n"); -#endif return TRUE; } @@ -281,10 +278,10 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv) + winCountBits(pScreenPriv->dwGreenMask) + winCountBits(pScreenPriv->dwBlueMask); - winErrorFVerb(2, "winFinishScreenInitFB - Masks: %08x %08x %08x\n", - (unsigned int) pScreenPriv->dwRedMask, - (unsigned int) pScreenPriv->dwGreenMask, - (unsigned int) pScreenPriv->dwBlueMask); + winDebug ("winFinishScreenInitFB - Masks: %08x %08x %08x\n", + (unsigned int) pScreenPriv->dwRedMask, + (unsigned int) pScreenPriv->dwGreenMask, + (unsigned int) pScreenPriv->dwBlueMask); /* Init visuals */ if (!(*pScreenPriv->pwinInitVisuals) (pScreen)) { @@ -367,16 +364,12 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv) #endif /* Setup the cursor routines */ -#if CYGDEBUG winDebug("winFinishScreenInitFB - Calling miDCInitialize ()\n"); -#endif miDCInitialize(pScreen, &g_winPointerCursorFuncs); /* KDrive does winCreateDefColormap right after miDCInitialize */ /* Create a default colormap */ -#if CYGDEBUG winDebug("winFinishScreenInitFB - Calling winCreateDefColormap ()\n"); -#endif if (!winCreateDefColormap(pScreen)) { ErrorF("winFinishScreenInitFB - Could not create colormap\n"); return FALSE; @@ -390,9 +383,7 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv) && !pScreenInfo->fMWExtWM #endif ) { -#if CYGDEBUG winDebug("winFinishScreenInitFB - Calling shadowSetup ()\n"); -#endif if (!shadowSetup(pScreen)) { ErrorF("winFinishScreenInitFB - shadowSetup () failed\n"); return FALSE; @@ -533,13 +524,11 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv) #ifdef XWIN_MULTIWINDOW || pScreenInfo->fMultiWindow #endif -#ifdef XWIN_MULTIWINDOWEXTWM +#ifdef XWIN_MULTIWINDOWINTWM || pScreenInfo->fInternalWM #endif ) { -#if CYGDEBUG || YES winDebug("winFinishScreenInitFB - Calling winInitWM.\n"); -#endif /* Initialize multi window mode */ if (!winInitWM(&pScreenPriv->pWMInfo, @@ -547,7 +536,7 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv) &pScreenPriv->ptXMsgProc, &pScreenPriv->pmServerStarted, pScreenInfo->dwScreen, (HWND) &pScreenPriv->hwndScreen, -#ifdef XWIN_MULTIWINDOWEXTWM +#ifdef XWIN_MULTIWINDOWINTWM pScreenInfo->fInternalWM || #endif FALSE)) { @@ -563,9 +552,7 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv) /* Tell the server that we have a valid depth */ pScreenPriv->fBadDepth = FALSE; -#if CYGDEBUG || YES winDebug("winFinishScreenInitFB - returning\n"); -#endif return TRUE; } |