Bug 636143. Window is not sized correctly after minizing and restoring when launched in fullscreen mode. r=jimm a=beltzner
authorFelipe Gomes <felipc@gmail.com>
Fri, 25 Feb 2011 13:29:41 -0800
changeset 63113 7da0462c13017e2c584147a8db3ca60456b138dc
parent 63112 e180004e766ee4fee1aac9ae302dc97dd565aa5b
child 63114 c60c4769c89afec0e8574008491335d496efaa7b
push id19031
push userfelipc@gmail.com
push dateFri, 25 Feb 2011 21:31:17 +0000
treeherdermozilla-central@7da0462c1301 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm, beltzner
bugs636143
milestone2.0b13pre
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 636143. Window is not sized correctly after minizing and restoring when launched in fullscreen mode. r=jimm a=beltzner
widget/src/windows/nsWindow.cpp
--- a/widget/src/windows/nsWindow.cpp
+++ b/widget/src/windows/nsWindow.cpp
@@ -6267,16 +6267,18 @@ void nsWindow::OnWindowPosChanged(WINDOW
     WINDOWPLACEMENT pl;
     pl.length = sizeof(pl);
     ::GetWindowPlacement(mWnd, &pl);
 
     if (pl.showCmd == SW_SHOWMAXIMIZED)
       event.mSizeMode = (mFullscreenMode ? nsSizeMode_Fullscreen : nsSizeMode_Maximized);
     else if (pl.showCmd == SW_SHOWMINIMIZED)
       event.mSizeMode = nsSizeMode_Minimized;
+    else if (mFullscreenMode)
+      event.mSizeMode = nsSizeMode_Fullscreen;
     else
       event.mSizeMode = nsSizeMode_Normal;
 
     // Windows has just changed the size mode of this window. The following
     // NS_SIZEMODE event will trigger a call into SetSizeMode where we will
     // set the min/max window state again or for nsSizeMode_Normal, call
     // SetWindow with a parameter of SW_RESTORE. There's no need however as
     // this window's mode has already changed. Updating mSizeMode here
@@ -6435,16 +6437,18 @@ void nsWindow::OnWindowPosChanging(LPWIN
     WINDOWPLACEMENT pl;
     pl.length = sizeof(pl);
     ::GetWindowPlacement(mWnd, &pl);
     PRInt32 sizeMode;
     if (pl.showCmd == SW_SHOWMAXIMIZED)
       sizeMode = (mFullscreenMode ? nsSizeMode_Fullscreen : nsSizeMode_Maximized);
     else if (pl.showCmd == SW_SHOWMINIMIZED)
       sizeMode = nsSizeMode_Minimized;
+    else if (mFullscreenMode)
+      sizeMode = nsSizeMode_Fullscreen;
     else
       sizeMode = nsSizeMode_Normal;
 
     nsSizeModeEvent event(PR_TRUE, NS_SIZEMODE, this);
 
     InitEvent(event);
     event.mSizeMode = static_cast<nsSizeMode>(sizeMode);
     DispatchWindowEvent(&event);