aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winscrinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin/winscrinit.c')
-rw-r--r--xorg-server/hw/xwin/winscrinit.c59
1 files changed, 23 insertions, 36 deletions
diff --git a/xorg-server/hw/xwin/winscrinit.c b/xorg-server/hw/xwin/winscrinit.c
index 639a99ca3..c0426ac0b 100644
--- 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;
}
@@ -282,10 +279,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)) {
@@ -371,16 +368,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;
@@ -394,9 +387,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;
@@ -537,13 +528,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,
@@ -551,7 +540,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)) {
@@ -567,9 +556,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;
}
@@ -679,7 +666,7 @@ winFinishScreenInitNativeGDI(int i,
/* Bitmap */
pScreen->BitmapToRegion = winPixmapToRegionNativeGDI;
- ErrorF("winFinishScreenInitNativeGDI - calling miDCInitialize\n");
+ winDebug ("winFinishScreenInitNativeGDI - calling miDCInitialize\n");
/* Set the default white and black pixel positions */
pScreen->whitePixel = pScreen->blackPixel = (Pixel) 0;
@@ -697,8 +684,8 @@ winFinishScreenInitNativeGDI(int i,
return FALSE;
}
- ErrorF("winFinishScreenInitNativeGDI - miCreateDefColormap () "
- "returned\n");
+ winDebug ("winFinishScreenInitNativeGDI - miCreateDefColormap () "
+ "returned\n");
/* mi doesn't use a CloseScreen procedure, so no need to wrap */
pScreen->CloseScreen = pScreenPriv->pwinCloseScreen;
@@ -706,8 +693,8 @@ winFinishScreenInitNativeGDI(int i,
/* Tell the server that we are enabled */
pScreenPriv->fEnabled = TRUE;
- ErrorF("winFinishScreenInitNativeGDI - Successful addition of "
- "screen %08x\n", (unsigned int) pScreen);
+ winDebug ("winFinishScreenInitNativeGDI - Successful addition of "
+ "screen %08x\n", (unsigned int) pScreen);
return TRUE;
}