Bug 512529 - Automatically leave fullscreen mode when it seems appropriate; r=neil
authorPhilipp Hartwig <ph@phhart.de>
Mon, 06 Feb 2012 18:17:32 +0000
changeset 86252 1b0294c7b95219b4138003708c3d33b445afd4c4
parent 86251 672b277a4a2c9895bf2a2c4dca9478b97d310d78
child 86253 9d9ae33d442c2c99795a546b86dc1002440b4b92
push id22008
push userbmo@edmorley.co.uk
push dateTue, 07 Feb 2012 10:32:58 +0000
treeherdermozilla-central@2b61af9d18ee [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersneil
bugs512529
milestone13.0a1
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 512529 - Automatically leave fullscreen mode when it seems appropriate; r=neil
xpfe/appshell/src/nsWebShellWindow.cpp
--- a/xpfe/appshell/src/nsWebShellWindow.cpp
+++ b/xpfe/appshell/src/nsWebShellWindow.cpp
@@ -374,16 +374,19 @@ nsWebShellWindow::HandleEvent(nsGUIEvent
 
         nsCOMPtr<nsPIDOMWindow> ourWindow = do_GetInterface(docShell);
         if (ourWindow) {
           // Let the application know if it's in fullscreen mode so it
           // can update its UI.
           if (modeEvent->mSizeMode == nsSizeMode_Fullscreen) {
             ourWindow->SetFullScreen(true);
           }
+          else if (modeEvent->mSizeMode != nsSizeMode_Minimized) {
+            ourWindow->SetFullScreen(false);
+          }
 
           // And always fire a user-defined sizemodechange event on the window
           ourWindow->DispatchCustomEvent("sizemodechange");
         }
 
         // Note the current implementation of SetSizeMode just stores
         // the new state; it doesn't actually resize. So here we store
         // the state and pass the event on to the OS. The day is coming