diff options
author | Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> | 2004-06-21 13:19:32 +0000 |
---|---|---|
committer | Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> | 2004-06-21 13:19:32 +0000 |
commit | d6e8b1affec7351549c0006cc63b6923091cdd68 (patch) | |
tree | 6e5e9dd1c1ec6e141349337df844b649bbf4277d /hw/xwin/winshadddnl.c | |
parent | dfdbb60bf5f613b3554d5435f08f16bde72aa353 (diff) |
Bug 777: Merge from CYGWIN branch
Diffstat (limited to 'hw/xwin/winshadddnl.c')
-rw-r--r-- | hw/xwin/winshadddnl.c | 287 |
1 files changed, 200 insertions, 87 deletions
diff --git a/hw/xwin/winshadddnl.c b/hw/xwin/winshadddnl.c index a5e09421e..c9e629298 100644 --- a/hw/xwin/winshadddnl.c +++ b/hw/xwin/winshadddnl.c @@ -34,6 +34,14 @@ #include "win.h" + +/* + * External symbols + */ + +extern HWND g_hDlgExit; + + /* * FIXME: Headers are broken, DEFINE_GUID doesn't work correctly, * so we have to redefine it here. @@ -55,19 +63,72 @@ DEFINE_GUID( IID_IDirectDraw4, 0x9c59509a,0x39bd,0x11d1,0x8c,0x4a,0x00,0xc0,0x4f /* + * Local prototypes + */ + +static Bool +winAllocateFBShadowDDNL (ScreenPtr pScreen); + +static void +winShadowUpdateDDNL (ScreenPtr pScreen, + shadowBufPtr pBuf); + +static Bool +winCloseScreenShadowDDNL (int nIndex, ScreenPtr pScreen); + +static Bool +winInitVisualsShadowDDNL (ScreenPtr pScreen); + +static Bool +winAdjustVideoModeShadowDDNL (ScreenPtr pScreen); + +static Bool +winBltExposedRegionsShadowDDNL (ScreenPtr pScreen); + +static Bool +winActivateAppShadowDDNL (ScreenPtr pScreen); + +static Bool +winRedrawScreenShadowDDNL (ScreenPtr pScreen); + +static Bool +winRealizeInstalledPaletteShadowDDNL (ScreenPtr pScreen); + +static Bool +winInstallColormapShadowDDNL (ColormapPtr pColormap); + +static Bool +winStoreColorsShadowDDNL (ColormapPtr pmap, + int ndef, + xColorItem *pdefs); + +static Bool +winCreateColormapShadowDDNL (ColormapPtr pColormap); + +static Bool +winDestroyColormapShadowDDNL (ColormapPtr pColormap); + +static Bool +winCreatePrimarySurfaceShadowDDNL (ScreenPtr pScreen); + +static Bool +winReleasePrimarySurfaceShadowDDNL (ScreenPtr pScreen); + + +/* * Create the primary surface and attach the clipper. * Used for both the initial surface creation and during * WM_DISPLAYCHANGE messages. */ -Bool +static Bool winCreatePrimarySurfaceShadowDDNL (ScreenPtr pScreen) { winScreenPriv(pScreen); HRESULT ddrval = DD_OK; DDSURFACEDESC2 ddsd; - ErrorF ("winCreatePrimarySurfaceShadowDDNL - Creating primary surface\n"); + winDebug ("winCreatePrimarySurfaceShadowDDNL - Creating primary surface\n"); /* Describe the primary surface */ ZeroMemory (&ddsd, sizeof (ddsd)); @@ -84,12 +145,12 @@ winCreatePrimarySurfaceShadowDDNL (ScreenPtr pScreen) { ErrorF ("winCreatePrimarySurfaceShadowDDNL - Could not create primary " "surface: %08x\n", - ddrval); + (unsigned int) ddrval); return FALSE; } #if 1 - ErrorF ("winCreatePrimarySurfaceShadowDDNL - Created primary surface\n"); + winDebug ("winCreatePrimarySurfaceShadowDDNL - Created primary surface\n"); #endif /* Attach our clipper to our primary surface handle */ @@ -99,12 +160,12 @@ winCreatePrimarySurfaceShadowDDNL (ScreenPtr pScreen) { ErrorF ("winCreatePrimarySurfaceShadowDDNL - Primary attach clipper " "failed: %08x\n", - ddrval); + (unsigned int) ddrval); return FALSE; } #if 1 - ErrorF ("winCreatePrimarySurfaceShadowDDNL - Attached clipper to primary " + winDebug ("winCreatePrimarySurfaceShadowDDNL - Attached clipper to primary " "surface\n"); #endif @@ -118,12 +179,12 @@ winCreatePrimarySurfaceShadowDDNL (ScreenPtr pScreen) * Called from WM_DISPLAYCHANGE. */ -Bool +static Bool winReleasePrimarySurfaceShadowDDNL (ScreenPtr pScreen) { winScreenPriv(pScreen); - ErrorF ("winReleasePrimarySurfaceShadowDDNL - Hello\n"); + winDebug ("winReleasePrimarySurfaceShadowDDNL - Hello\n"); /* Release the primary surface and clipper, if they exist */ if (pScreenPriv->pddsPrimary4) @@ -135,14 +196,14 @@ winReleasePrimarySurfaceShadowDDNL (ScreenPtr pScreen) IDirectDrawSurface4_SetClipper (pScreenPriv->pddsPrimary4, NULL); - ErrorF ("winReleasePrimarySurfaceShadowDDNL - Detached clipper\n"); + winDebug ("winReleasePrimarySurfaceShadowDDNL - Detached clipper\n"); /* Release the primary surface */ IDirectDrawSurface4_Release (pScreenPriv->pddsPrimary4); pScreenPriv->pddsPrimary4 = NULL; } - ErrorF ("winReleasePrimarySurfaceShadowDDNL - Released primary surface\n"); + winDebug ("winReleasePrimarySurfaceShadowDDNL - Released primary surface\n"); return TRUE; } @@ -167,7 +228,7 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen) DDPIXELFORMAT ddpfPrimary; #if CYGDEBUG - ErrorF ("winAllocateFBShadowDDNL - w %d h %d d %d\n", + winDebug ("winAllocateFBShadowDDNL - w %d h %d d %d\n", pScreenInfo->dwWidth, pScreenInfo->dwHeight, pScreenInfo->dwDepth); #endif @@ -192,12 +253,12 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen) if (FAILED (ddrval)) { ErrorF ("winAllocateFBShadowDDNL - Could not attach clipper: %08x\n", - ddrval); + (unsigned int) ddrval); return FALSE; } #if CYGDEBUG - ErrorF ("winAllocateFBShadowDDNL - Created a clipper\n"); + winDebug ("winAllocateFBShadowDDNL - Created a clipper\n"); #endif /* Get a device context for the screen */ @@ -211,12 +272,12 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen) { ErrorF ("winAllocateFBShadowDDNL - Clipper not attached " "to window: %08x\n", - ddrval); + (unsigned int) ddrval); return FALSE; } #if CYGDEBUG - ErrorF ("winAllocateFBShadowDDNL - Attached clipper to window\n"); + winDebug ("winAllocateFBShadowDDNL - Attached clipper to window\n"); #endif /* Create a DirectDraw object, store the address at lpdd */ @@ -227,12 +288,12 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen) { ErrorF ("winAllocateFBShadowDDNL - Could not start " "DirectDraw: %08x\n", - ddrval); + (unsigned int) ddrval); return FALSE; } #if CYGDEBUG - ErrorF ("winAllocateFBShadowDDNL - Created and initialized DD\n"); + winDebug ("winAllocateFBShadowDDNL - Created and initialized DD\n"); #endif /* Get a DirectDraw4 interface pointer */ @@ -242,7 +303,7 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen) if (FAILED (ddrval)) { ErrorF ("winAllocateFBShadowDDNL - Failed DD4 query: %08x\n", - ddrval); + (unsigned int) ddrval); return FALSE; } @@ -262,7 +323,7 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen) { ErrorF ("winAllocateFBShadowDDNL - Could not set " "cooperative level: %08x\n", - ddrval); + (unsigned int) ddrval); return FALSE; } @@ -282,7 +343,7 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen) { ErrorF ("winAllocateFBShadowDDNL - Could not get current " "refresh rate: %08x. Continuing.\n", - ddrval); + (unsigned int) ddrval); dwRefreshRateCurrent = 0; } else @@ -316,7 +377,7 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen) || pScreenInfo->dwBPP != GetDeviceCaps (hdc, BITSPIXEL) || pScreenInfo->dwRefreshRate != 0)) { - ErrorF ("winAllocateFBShadowDDNL - Changing video mode\n"); + winDebug ("winAllocateFBShadowDDNL - Changing video mode\n"); /* Change the video mode to the mode requested */ ddrval = IDirectDraw4_SetDisplayMode (pScreenPriv->pdd4, @@ -329,13 +390,13 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen) { ErrorF ("winAllocateFBShadowDDNL - Could not set " "full screen display mode: %08x\n", - ddrval); + (unsigned int) ddrval); return FALSE; } } else { - ErrorF ("winAllocateFBShadowDDNL - Not changing video mode\n"); + winDebug ("winAllocateFBShadowDDNL - Not changing video mode\n"); } /* Release our DC */ @@ -352,7 +413,7 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen) { ErrorF ("winAllocateFBShadowDDNL - Could not set " "cooperative level: %08x\n", - ddrval); + (unsigned int) ddrval); return FALSE; } } @@ -374,12 +435,12 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen) { ErrorF ("winAllocateFBShadowDDNL - Could not get primary " "pixformat: %08x\n", - ddrval); + (unsigned int) ddrval); return FALSE; } #if CYGDEBUG - ErrorF ("winAllocateFBShadowDDNL - Primary masks: %08x %08x %08x " + winDebug ("winAllocateFBShadowDDNL - Primary masks: %08x %08x %08x " "dwRGBBitCount: %d\n", ddpfPrimary.u2.dwRBitMask, ddpfPrimary.u3.dwGBitMask, @@ -407,8 +468,8 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen) ddsdShadow.lpSurface = lpSurface; ddsdShadow.u4.ddpfPixelFormat = ddpfPrimary; - ErrorF ("winAllocateFBShadowDDNL - lPitch: %d\n", - pScreenInfo->dwPaddedWidth); + winDebug ("winAllocateFBShadowDDNL - lPitch: %d\n", + (int) pScreenInfo->dwPaddedWidth); /* Create the shadow surface */ ddrval = IDirectDraw4_CreateSurface (pScreenPriv->pdd4, @@ -418,13 +479,13 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen) if (FAILED (ddrval)) { ErrorF ("winAllocateFBShadowDDNL - Could not create shadow " - "surface: %08x\n", ddrval); + "surface: %08x\n", (unsigned int) ddrval); return FALSE; } #if CYGDEBUG || YES - ErrorF ("winAllocateFBShadowDDNL - Created shadow pitch: %d\n", - ddsdShadow.u1.lPitch); + winDebug ("winAllocateFBShadowDDNL - Created shadow pitch: %d\n", + (int) ddsdShadow.u1.lPitch); #endif /* Grab the pitch from the surface desc */ @@ -432,8 +493,8 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen) / pScreenInfo->dwBPP; #if CYGDEBUG || YES - ErrorF ("winAllocateFBShadowDDNL - Created shadow stride: %d\n", - pScreenInfo->dwStride); + winDebug ("winAllocateFBShadowDDNL - Created shadow stride: %d\n", + (int) pScreenInfo->dwStride); #endif /* Save the pointer to our surface memory */ @@ -445,7 +506,7 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen) pScreenPriv->dwBlueMask = ddsdShadow.u4.ddpfPixelFormat.u4.dwBBitMask; #if CYGDEBUG - ErrorF ("winAllocateFBShadowDDNL - Returning\n"); + winDebug ("winAllocateFBShadowDDNL - Returning\n"); #endif return TRUE; @@ -453,10 +514,57 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen) /* + * Create a DirectDraw surface for the new multi-window window + */ + +static +Bool +winFinishCreateWindowsWindowDDNL (WindowPtr pWin) +{ + winWindowPriv(pWin); + winPrivScreenPtr pScreenPriv = pWinPriv->pScreenPriv; + HRESULT ddrval = DD_OK; + DDSURFACEDESC2 ddsd; + int iWidth, iHeight; + int iX, iY; + + winDebug ("\nwinFinishCreateWindowsWindowDDNL!\n\n"); + + iX = pWin->drawable.x + GetSystemMetrics (SM_XVIRTUALSCREEN); + iY = pWin->drawable.y + GetSystemMetrics (SM_YVIRTUALSCREEN); + + iWidth = pWin->drawable.width; + iHeight = pWin->drawable.height; + + /* Describe the primary surface */ + ZeroMemory (&ddsd, sizeof (ddsd)); + ddsd.dwSize = sizeof (ddsd); + ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT; + ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; + ddsd.dwHeight = iHeight; + ddsd.dwWidth = iWidth; + + /* Create the primary surface */ + ddrval = IDirectDraw4_CreateSurface (pScreenPriv->pdd4, + &ddsd, + &pWinPriv->pddsPrimary4, + NULL); + if (FAILED (ddrval)) + { + ErrorF ("winFinishCreateWindowsWindowDDNL - Could not create primary " + "surface: %08x\n", + (unsigned int)ddrval); + return FALSE; + } + return TRUE; +} + + +/* * Transfer the damaged regions of the shadow framebuffer to the display. */ -void +static void winShadowUpdateDDNL (ScreenPtr pScreen, shadowBufPtr pBuf) { @@ -522,7 +630,7 @@ winShadowUpdateDDNL (ScreenPtr pScreen, { ErrorF ("winShadowUpdateDDNL - IDirectDrawSurface4_Blt () " "failed: %08x\n", - ddrval); + (unsigned int) ddrval); ++s_iFailCount; @@ -530,7 +638,7 @@ winShadowUpdateDDNL (ScreenPtr pScreen, { ErrorF ("winShadowUpdateDDNL - IDirectDrawSurface4_Blt " "failure message maximum (%d) reached. No " - "more failure messages will be printed.", + "more failure messages will be printed.\n", FAIL_MSG_MAX_BLT); } } @@ -562,7 +670,7 @@ winShadowUpdateDDNL (ScreenPtr pScreen, hrgnCombined = NULL; #if CYGDEBUG - ErrorF ("winShadowUpdateDDNL - be x1 %d y1 %d x2 %d y2 %d\n", + winDebug ("winShadowUpdateDDNL - be x1 %d y1 %d x2 %d y2 %d\n", pBoxExtents->x1, pBoxExtents->y1, pBoxExtents->x2, pBoxExtents->y2); #endif @@ -599,7 +707,7 @@ winShadowUpdateDDNL (ScreenPtr pScreen, * Free our resources and private structures. */ -Bool +static Bool winCloseScreenShadowDDNL (int nIndex, ScreenPtr pScreen) { winScreenPriv(pScreen); @@ -607,7 +715,7 @@ winCloseScreenShadowDDNL (int nIndex, ScreenPtr pScreen) Bool fReturn; #if CYGDEBUG - ErrorF ("winCloseScreenShadowDDNL - Freeing screen resources\n"); + winDebug ("winCloseScreenShadowDDNL - Freeing screen resources\n"); #endif /* Flag that the screen is closed */ @@ -685,8 +793,10 @@ winCloseScreenShadowDDNL (int nIndex, ScreenPtr pScreen) pScreenPriv->hwndScreen = NULL; } +#if defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW) /* Destroy the thread startup mutex */ pthread_mutex_destroy (&pScreenPriv->pmServerStarted); +#endif /* Kill our screeninfo's pointer to the screen */ pScreenInfo->pScreen = NULL; @@ -709,7 +819,7 @@ winCloseScreenShadowDDNL (int nIndex, ScreenPtr pScreen) * to verify that last sentence. */ -Bool +static Bool winInitVisualsShadowDDNL (ScreenPtr pScreen) { winScreenPriv(pScreen); @@ -731,14 +841,14 @@ winInitVisualsShadowDDNL (ScreenPtr pScreen) else pScreenPriv->dwBitsPerRGB = dwBlueBits; - ErrorF ("winInitVisualsShadowDDNL - Masks %08x %08x %08x BPRGB %d d %d " + winDebug ("winInitVisualsShadowDDNL - Masks %08x %08x %08x BPRGB %d d %d " "bpp %d\n", - pScreenPriv->dwRedMask, - pScreenPriv->dwGreenMask, - pScreenPriv->dwBlueMask, - pScreenPriv->dwBitsPerRGB, - pScreenInfo->dwDepth, - pScreenInfo->dwBPP); + (unsigned int) pScreenPriv->dwRedMask, + (unsigned int) pScreenPriv->dwGreenMask, + (unsigned int) pScreenPriv->dwBlueMask, + (int) pScreenPriv->dwBitsPerRGB, + (int) pScreenInfo->dwDepth, + (int) pScreenInfo->dwBPP); /* Create a single visual according to the Windows screen depth */ switch (pScreenInfo->dwDepth) @@ -761,7 +871,7 @@ winInitVisualsShadowDDNL (ScreenPtr pScreen) return FALSE; } -#if WIN_EMULATE_PSEUDO_SUPPORT +#ifdef XWIN_EMULATEPSEUDO if (!pScreenInfo->fEmulatePseudo) break; @@ -793,7 +903,7 @@ winInitVisualsShadowDDNL (ScreenPtr pScreen) return FALSE; } -#if WIN_EMULATE_PSEUDO_SUPPORT +#ifdef XWIN_EMULATEPSEUDO if (!pScreenInfo->fEmulatePseudo) break; @@ -851,7 +961,7 @@ winInitVisualsShadowDDNL (ScreenPtr pScreen) } #if CYGDEBUG - ErrorF ("winInitVisualsShadowDDNL - Returning\n"); + winDebug ("winInitVisualsShadowDDNL - Returning\n"); #endif return TRUE; @@ -862,7 +972,7 @@ winInitVisualsShadowDDNL (ScreenPtr pScreen) * Adjust the user proposed video mode */ -Bool +static Bool winAdjustVideoModeShadowDDNL (ScreenPtr pScreen) { winScreenPriv(pScreen); @@ -885,8 +995,8 @@ winAdjustVideoModeShadowDDNL (ScreenPtr pScreen) if (pScreenInfo->dwBPP == WIN_DEFAULT_BPP) { /* No -depth parameter passed, let the user know the depth being used */ - ErrorF ("winAdjustVideoModeShadowDDNL - Using Windows display " - "depth of %d bits per pixel\n", dwBPP); + winErrorFVerb (2, "winAdjustVideoModeShadowDDNL - Using Windows display " + "depth of %d bits per pixel\n", (int) dwBPP); /* Use GDI's depth */ pScreenInfo->dwBPP = dwBPP; @@ -895,15 +1005,15 @@ winAdjustVideoModeShadowDDNL (ScreenPtr pScreen) && pScreenInfo->dwBPP != dwBPP) { /* FullScreen, and GDI depth differs from -depth parameter */ - ErrorF ("winAdjustVideoModeShadowDDNL - FullScreen, using command " - "line bpp: %d\n", pScreenInfo->dwBPP); + winErrorFVerb (2, "winAdjustVideoModeShadowDDNL - FullScreen, using command " + "line bpp: %d\n", (int) pScreenInfo->dwBPP); } else if (dwBPP != pScreenInfo->dwBPP) { /* Windowed, and GDI depth differs from -depth parameter */ - ErrorF ("winAdjustVideoModeShadowDDNL - Windowed, command line " + winErrorFVerb (2, "winAdjustVideoModeShadowDDNL - Windowed, command line " "bpp: %d, using bpp: %d\n", - pScreenInfo->dwBPP, dwBPP); + (int) pScreenInfo->dwBPP, (int) dwBPP); /* We'll use GDI's depth */ pScreenInfo->dwBPP = dwBPP; @@ -913,7 +1023,7 @@ winAdjustVideoModeShadowDDNL (ScreenPtr pScreen) if (pScreenInfo->dwWidth * pScreenInfo->dwHeight * pScreenInfo->dwBPP >= WIN_DIB_MAXIMUM_SIZE) { - ErrorF ("winAdjustVideoModeShadowDDNL - Requested DirectDraw surface " + winErrorFVerb (1, "winAdjustVideoModeShadowDDNL - Requested DirectDraw surface " "will be larger than %d MB. The surface may fail to be " "allocated on Windows 95, 98, or Me, due to a %d MB limit in " "DIB size. This limit does not apply to Windows NT/2000, and " @@ -932,7 +1042,7 @@ winAdjustVideoModeShadowDDNL (ScreenPtr pScreen) * Blt exposed regions to the screen */ -Bool +static Bool winBltExposedRegionsShadowDDNL (ScreenPtr pScreen) { winScreenPriv(pScreen); @@ -986,29 +1096,29 @@ winBltExposedRegionsShadowDDNL (ScreenPtr pScreen) if (ddrval == DDERR_SURFACELOST) { /* Surface was lost */ - ErrorF ("winBltExposedRegionsShadowDDNL - IDirectDrawSurface4_Blt " - "reported that the primary surface was lost, " - "trying to restore, retry: %d\n", i + 1); + winErrorFVerb (1, "winBltExposedRegionsShadowDDNL - " + "IDirectDrawSurface4_Blt reported that the primary " + "surface was lost, trying to restore, retry: %d\n", i + 1); /* Try to restore the surface, once */ ddrval = IDirectDrawSurface4_Restore (pScreenPriv->pddsPrimary4); - ErrorF ("winBltExposedRegionsShadowDDNL - " + winDebug ("winBltExposedRegionsShadowDDNL - " "IDirectDrawSurface4_Restore returned: "); if (ddrval == DD_OK) - continue; + winDebug ("DD_OK\n"); else if (ddrval == DDERR_WRONGMODE) - ErrorF ("DDERR_WRONGMODE\n"); + winDebug ("DDERR_WRONGMODE\n"); else if (ddrval == DDERR_INCOMPATIBLEPRIMARY) - ErrorF ("DDERR_INCOMPATIBLEPRIMARY\n"); + winDebug ("DDERR_INCOMPATIBLEPRIMARY\n"); else if (ddrval == DDERR_UNSUPPORTED) - ErrorF ("DDERR_UNSUPPORTED\n"); + winDebug ("DDERR_UNSUPPORTED\n"); else if (ddrval == DDERR_INVALIDPARAMS) - ErrorF ("DDERR_INVALIDPARAMS\n"); + winDebug ("DDERR_INVALIDPARAMS\n"); else if (ddrval == DDERR_INVALIDOBJECT) - ErrorF ("DDERR_INVALIDOBJECT\n"); + winDebug ("DDERR_INVALIDOBJECT\n"); else - ErrorF ("unknown error: %08x\n", ddrval); + winDebug ("unknown error: %08x\n", (unsigned int) ddrval); /* Loop around to try the blit one more time */ continue; @@ -1016,8 +1126,10 @@ winBltExposedRegionsShadowDDNL (ScreenPtr pScreen) else if (FAILED (ddrval)) { fReturn = FALSE; - ErrorF ("winBltExposedRegionsShadowDDNL - IDirectDrawSurface4_Blt " - "failed, but surface not lost: %08x %d\n", ddrval, ddrval); + winErrorFVerb (1, "winBltExposedRegionsShadowDDNL - " + "IDirectDrawSurface4_Blt failed, but surface not " + "lost: %08x %d\n", + (unsigned int) ddrval, (int) ddrval); goto winBltExposedRegionsShadowDDNL_Exit; } else @@ -1036,10 +1148,10 @@ winBltExposedRegionsShadowDDNL (ScreenPtr pScreen) /* - * Do any engine-specific appliation-activation processing + * Do any engine-specific application-activation processing */ -Bool +static Bool winActivateAppShadowDDNL (ScreenPtr pScreen) { winScreenPriv(pScreen); @@ -1065,7 +1177,7 @@ winActivateAppShadowDDNL (ScreenPtr pScreen) * Reblit the shadow framebuffer to the screen. */ -Bool +static Bool winRedrawScreenShadowDDNL (ScreenPtr pScreen) { winScreenPriv(pScreen); @@ -1102,7 +1214,7 @@ winRedrawScreenShadowDDNL (ScreenPtr pScreen) { ErrorF ("winRedrawScreenShadowDDNL - IDirectDrawSurface4_Blt () " "failed: %08x\n", - ddrval); + (unsigned int) ddrval); } return TRUE; @@ -1113,7 +1225,7 @@ winRedrawScreenShadowDDNL (ScreenPtr pScreen) * Realize the currently installed colormap */ -Bool +static Bool winRealizeInstalledPaletteShadowDDNL (ScreenPtr pScreen) { return TRUE; @@ -1124,7 +1236,7 @@ winRealizeInstalledPaletteShadowDDNL (ScreenPtr pScreen) * Install the specified colormap */ -Bool +static Bool winInstallColormapShadowDDNL (ColormapPtr pColormap) { ScreenPtr pScreen = pColormap->pScreen; @@ -1153,7 +1265,7 @@ winInstallColormapShadowDDNL (ColormapPtr pColormap) * Store the specified colors in the specified colormap */ -Bool +static Bool winStoreColorsShadowDDNL (ColormapPtr pColormap, int ndef, xColorItem *pdefs) @@ -1197,7 +1309,7 @@ winStoreColorsShadowDDNL (ColormapPtr pColormap, * Colormap initialization procedure */ -Bool +static Bool winCreateColormapShadowDDNL (ColormapPtr pColormap) { HRESULT ddrval = DD_OK; @@ -1225,7 +1337,7 @@ winCreateColormapShadowDDNL (ColormapPtr pColormap) * Colormap destruction procedure */ -Bool +static Bool winDestroyColormapShadowDDNL (ColormapPtr pColormap) { winScreenPriv(pColormap->pScreen); @@ -1243,8 +1355,7 @@ winDestroyColormapShadowDDNL (ColormapPtr pColormap) if (pColormap->flags & IsDefault) { #if CYGDEBUG - ErrorF ("winDestroyColormapShadowDDNL - Destroying default " - "colormap\n"); + winDebug ("winDestroyColormapShadowDDNL - Destroying default colormap\n"); #endif /* @@ -1306,11 +1417,13 @@ winSetEngineFunctionsShadowDDNL (ScreenPtr pScreen) pScreenPriv->pwinStoreColors = winStoreColorsShadowDDNL; pScreenPriv->pwinCreateColormap = winCreateColormapShadowDDNL; pScreenPriv->pwinDestroyColormap = winDestroyColormapShadowDDNL; - pScreenPriv->pwinHotKeyAltTab = (winHotKeyAltTabProcPtr) (void (*)())NoopDDA; + pScreenPriv->pwinHotKeyAltTab = (winHotKeyAltTabProcPtr) (void (*)(void))NoopDDA; pScreenPriv->pwinCreatePrimarySurface = winCreatePrimarySurfaceShadowDDNL; pScreenPriv->pwinReleasePrimarySurface = winReleasePrimarySurfaceShadowDDNL; +#ifdef XWIN_MULTIWINDOW + pScreenPriv->pwinFinishCreateWindowsWindow + = winFinishCreateWindowsWindowDDNL; +#endif return TRUE; } - - |