Fixed the invalidate for the Palette. r=rods

This commit is contained in:
dcone%netscape.com 2000-02-11 14:35:01 +00:00
Родитель 84639d6d3b
Коммит 1a03ad51ce
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -2555,7 +2555,7 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT
}
// fall thru...
case WM_QUERYNEWPALETTE:
case WM_QUERYNEWPALETTE: // this window is about to become active
mContext->GetPaletteInfo(palInfo);
if (palInfo.isPaletteDevice && palInfo.palette) {
HDC hDC = ::GetDC(mWnd);
@ -2564,11 +2564,11 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT
// Realize the drawing palette
int i = ::RealizePalette(hDC);
// Did any of our colors change?
if (i > 0) {
// Yes, so repaint
::InvalidateRect(mWnd, (LPRECT)NULL, TRUE);
}
//printf("number of colors that changed=%d\n",i);
// we should always invalidate.. because the lookup may have changed
::InvalidateRect(mWnd, (LPRECT)NULL, TRUE);
::ReleaseDC(mWnd, hDC);
*aRetValue = TRUE;
}