Bug 513922 - "AutoErase() should invalidate the erased region on WinCE" r=roc

This commit is contained in:
brian :crowder 2009-09-02 20:40:10 -04:00
parent 12ac4739b6
commit 2f7e9299e6
2 changed files with 9 additions and 4 deletions

View File

@ -3840,7 +3840,7 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM &wParam, LPARAM &lParam,
// say we've dealt with erase background if widget does
// not need auto-erasing
case WM_ERASEBKGND:
if (! AutoErase()) {
if (!AutoErase((HDC)wParam)) {
*aRetValue = 1;
result = PR_TRUE;
}
@ -5968,9 +5968,14 @@ HBRUSH nsWindow::OnControlColor()
return mBrush;
}
// Can be overriden. Controls auot-erase of background.
PRBool nsWindow::AutoErase()
// Can be overriden. Controls auto-erase of background.
PRBool nsWindow::AutoErase(HDC dc)
{
#ifdef WINCE
RECT wrect;
GetClipBox(dc, &wrect);
AddRECTToRegion(wrect, mInvalidatedRegion);
#endif
return PR_FALSE;
}

View File

@ -222,7 +222,7 @@ public:
/**
* Misc.
*/
virtual PRBool AutoErase();
virtual PRBool AutoErase(HDC dc);
nsIntPoint* GetLastPoint() { return &mLastPoint; }
PRInt32 GetNewCmdMenuId() { mMenuCmdId++; return mMenuCmdId; }
PRBool GetIMEEnabled() { return mIMEEnabled; }