Changes SelectPalette forground/background param to TRUE from FALSE

this is a stop gap to stop 8 bit from crashing Bug# 7426
This commit is contained in:
rods%netscape.com 1999-09-10 14:24:20 +00:00
parent c3359c61d4
commit 42c4a5ea79

View File

@ -2590,7 +2590,10 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT
mContext->GetPaletteInfo(palInfo);
if (palInfo.isPaletteDevice && palInfo.palette) {
HDC hDC = ::GetDC(mWnd);
HPALETTE hOldPal = ::SelectPalette(hDC, (HPALETTE)palInfo.palette, FALSE);
// XXX Setting this to TRUE to stop it hanging
// it should be FALSE
//HPALETTE hOldPal = ::SelectPalette(hDC, (HPALETTE)palInfo.palette, FALSE);
HPALETTE hOldPal = ::SelectPalette(hDC, (HPALETTE)palInfo.palette, TRUE);
// Realize the drawing palette
int i = ::RealizePalette(hDC);