From 58e86733e61b771bc7e7a05b28f87dcf418de923 Mon Sep 17 00:00:00 2001 From: Jim Mathies Date: Wed, 9 Feb 2011 16:37:58 -0600 Subject: [PATCH] Bug 594821 - Sync update top level windows when they are first shown. r=roc, a=final. --- widget/src/windows/nsWindow.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/widget/src/windows/nsWindow.cpp b/widget/src/windows/nsWindow.cpp index 7a2147608a8..a83f0ee8e61 100644 --- a/widget/src/windows/nsWindow.cpp +++ b/widget/src/windows/nsWindow.cpp @@ -1224,6 +1224,8 @@ NS_METHOD nsWindow::Show(PRBool bState) } #endif + PRBool syncInvalidate = PR_FALSE; + PRBool wasVisible = mIsVisible; // Set the status now so that anyone asking during ShowWindow or // SetWindowPos would get the correct answer. @@ -1236,6 +1238,9 @@ NS_METHOD nsWindow::Show(PRBool bState) if (mWnd) { if (bState) { if (!wasVisible && mWindowType == eWindowType_toplevel) { + // speed up the initial paint after show for + // top level windows: + syncInvalidate = PR_TRUE; switch (mSizeMode) { #ifdef WINCE case nsSizeMode_Fullscreen: @@ -1320,7 +1325,7 @@ NS_METHOD nsWindow::Show(PRBool bState) #ifdef MOZ_XUL if (!wasVisible && bState) - Invalidate(PR_FALSE); + Invalidate(syncInvalidate); #endif return NS_OK;