Bug 629860 - Fix for repaint issues when closing-reopening-restoring from full screen mode. r=vlad, a=final.
authorJim Mathies <jmathies@mozilla.com>
Tue, 15 Feb 2011 15:31:34 -0600
changeset 62612 66d28237fdf7d94343e45530f49632fad673da87
parent 62611 fbfd2ea90615a47787eb512b8ed953159d431d53
child 62613 1211777b3f5a194d46b8ee45ea6dc4d818f11fe9
push id18798
push userjmathies@mozilla.com
push dateTue, 15 Feb 2011 21:31:55 +0000
treeherdermozilla-central@66d28237fdf7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvlad, final
bugs629860
milestone2.0b12pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 629860 - Fix for repaint issues when closing-reopening-restoring from full screen mode. r=vlad, a=final.
widget/src/windows/nsWindow.cpp
--- a/widget/src/windows/nsWindow.cpp
+++ b/widget/src/windows/nsWindow.cpp
@@ -1225,16 +1225,23 @@ NS_METHOD nsWindow::Show(PRBool bState)
 
   PRBool syncInvalidate = PR_FALSE;
 
   PRBool wasVisible = mIsVisible;
   // Set the status now so that anyone asking during ShowWindow or
   // SetWindowPos would get the correct answer.
   mIsVisible = bState;
 
+  // We may have cached an out of date visible state. This can happen
+  // when session restore sets the full screen mode.
+  if (mIsVisible)
+    mOldStyle |= WS_VISIBLE;
+  else
+    mOldStyle &= ~WS_VISIBLE;
+
   if (!mIsVisible && wasVisible) {
       ClearCachedResources();
   }
 
   if (mWnd) {
     if (bState) {
       if (!wasVisible && mWindowType == eWindowType_toplevel) {
         // speed up the initial paint after show for