Changed to realize the palette in the background

This commit is contained in:
troy%netscape.com 1998-08-19 01:58:17 +00:00
parent bb68bab7e9
commit 3dbd80aad0

View File

@ -443,7 +443,8 @@ nsresult nsRenderingContextWin :: SetupDC(HDC aOldDC, HDC aNewDC)
nsPaletteInfo palInfo;
mContext->GetPaletteInfo(palInfo);
if (palInfo.isPaletteDevice && palInfo.palette) {
mOrigPalette = ::SelectPalette(aNewDC, (HPALETTE)palInfo.palette, FALSE);
// Select the palette in the background
mOrigPalette = ::SelectPalette(aNewDC, (HPALETTE)palInfo.palette, TRUE);
// Don't do the realization for an off-screen memory DC
if (nsnull == aOldDC) {
::RealizePalette(aNewDC);