Bug 607251 - Aero broken with Basic/Aero theme and minimize/un-minimize. r=jimm

This commit is contained in:
Brian R. Bondy 2011-10-07 21:52:09 -04:00
Родитель 921c305be0
Коммит b8bb79d9a0
2 изменённых файлов: 35 добавлений и 18 удалений

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

@ -2651,32 +2651,46 @@ NS_IMETHODIMP nsWindow::HideWindowChrome(bool aShouldHide)
/**************************************************************
*
* SECTION: nsIWidget::Invalidate
* SECTION: nsWindow::Invalidate
*
* Invalidate an area of the client for painting.
*
**************************************************************/
// Invalidate this component visible area
NS_METHOD nsWindow::Invalidate(bool aIsSynchronous)
NS_METHOD nsWindow::Invalidate(bool aIsSynchronous,
bool aEraseBackground,
bool aUpdateNCArea,
bool aIncludeChildren)
{
if (mWnd)
{
if (!mWnd) {
return NS_OK;
}
#ifdef WIDGET_DEBUG_OUTPUT
debug_DumpInvalidate(stdout,
this,
nsnull,
aIsSynchronous,
nsCAutoString("noname"),
(PRInt32) mWnd);
debug_DumpInvalidate(stdout,
this,
nsnull,
aIsSynchronous,
nsCAutoString("noname"),
(PRInt32) mWnd);
#endif // WIDGET_DEBUG_OUTPUT
VERIFY(::InvalidateRect(mWnd, NULL, FALSE));
if (aIsSynchronous) {
VERIFY(::UpdateWindow(mWnd));
}
DWORD flags = RDW_INVALIDATE;
if (aEraseBackground) {
flags |= RDW_ERASE;
}
if (aIsSynchronous) {
flags |= RDW_UPDATENOW;
}
if (aUpdateNCArea) {
flags |= RDW_FRAME;
}
if (aIncludeChildren) {
flags |= RDW_ALLCHILDREN;
}
VERIFY(::RedrawWindow(mWnd, NULL, NULL, flags));
return NS_OK;
}
@ -4687,7 +4701,7 @@ bool nsWindow::ProcessMessage(UINT msg, WPARAM &wParam, LPARAM &lParam,
// Invalidate the window so that the repaint will
// pick up the new theme.
Invalidate(false);
Invalidate(true, true, true, true);
}
break;
@ -5366,7 +5380,7 @@ bool nsWindow::ProcessMessage(UINT msg, WPARAM &wParam, LPARAM &lParam,
BroadcastMsg(mWnd, WM_DWMCOMPOSITIONCHANGED);
DispatchStandardEvent(NS_THEMECHANGED);
UpdateGlass();
Invalidate(false);
Invalidate(true, true, true, true);
break;
#endif

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

@ -145,7 +145,10 @@ public:
virtual nsresult ConfigureChildren(const nsTArray<Configuration>& aConfigurations);
NS_IMETHOD MakeFullScreen(bool aFullScreen);
NS_IMETHOD HideWindowChrome(bool aShouldHide);
NS_IMETHOD Invalidate(bool aIsSynchronous);
NS_IMETHOD Invalidate(bool aIsSynchronous,
bool aEraseBackground = false,
bool aUpdateNCArea = false,
bool aIncludeChildren = false);
NS_IMETHOD Invalidate(const nsIntRect & aRect, bool aIsSynchronous);
NS_IMETHOD Update();
virtual void* GetNativeData(PRUint32 aDataType);