Bug 648902 - Limit the 'hide browser window when transitioning to full screen' functionality to normalized windows. (UX improvement) r=roc
authorJim Mathies <jmathies@mozilla.com>
Mon, 11 Apr 2011 12:46:18 -0500
changeset 67849 31631f4fab615ad9fb18baa97e3426c2e73f629a
parent 67848 1cd680c5a4b7ff992b4cf671fd0d7000aaab0bd9
child 67850 7cf73914be2a26e4fdff3d66608f819250232ea9
child 67861 f548afb7caca2700314b42f46a42400aba13cfaa
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs648902
milestone2.2a1pre
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 648902 - Limit the 'hide browser window when transitioning to full screen' functionality to normalized windows. (UX improvement) r=roc
widget/src/windows/nsWindow.cpp
--- a/widget/src/windows/nsWindow.cpp
+++ b/widget/src/windows/nsWindow.cpp
@@ -2901,17 +2901,18 @@ nsWindow::MakeFullScreen(PRBool aFullScr
     SetSizeMode(nsSizeMode_Fullscreen);
   } else {
     SetSizeMode(mOldSizeMode);
   }
 
   UpdateNonClientMargins();
 
   PRBool visible = mIsVisible;
-  Show(PR_FALSE);
+  if (mOldSizeMode == nsSizeMode_Normal)
+    Show(PR_FALSE);
   
   // Will call hide chrome, reposition window. Note this will
   // also cache dimensions for restoration, so it should only
   // be called once per fullscreen request.
   nsresult rv = nsBaseWidget::MakeFullScreen(aFullScreen);
 
   if (visible) {
     Show(PR_TRUE);