Bug 526282 - Minimize button disabled after full screen mode on Mac OS 10.6. r=josh
authorMarkus Stange <mstange@themasta.com>
Wed, 13 Jan 2010 17:17:57 +0100
changeset 37145 5652d2df092fa2773f5b30674cb5519c8b613ae1
parent 37144 c17e730faa4c33671372d751690eecdcbf7b94ab
child 37146 28e8bdda3413e2e1aa0720142973cffb35251f0c
push id11142
push usermstange@themasta.com
push dateWed, 13 Jan 2010 16:23:57 +0000
treeherdermozilla-central@28e8bdda3413 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjosh
bugs526282
milestone1.9.3a1pre
Bug 526282 - Minimize button disabled after full screen mode on Mac OS 10.6. r=josh
widget/src/cocoa/nsCocoaWindow.mm
--- a/widget/src/cocoa/nsCocoaWindow.mm
+++ b/widget/src/cocoa/nsCocoaWindow.mm
@@ -1067,22 +1067,24 @@ NS_IMETHODIMP nsCocoaWindow::HideWindowC
 
 NS_METHOD nsCocoaWindow::MakeFullScreen(PRBool aFullScreen)
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
 
   NS_ASSERTION(mFullScreen != aFullScreen, "Unnecessary MakeFullScreen call");
 
   NSDisableScreenUpdates();
+  // The order here matters. When we exit full screen mode, we need to show the
+  // Dock first, otherwise the newly-created window won't have its minimize
+  // button enabled. See bug 526282.
+  nsCocoaUtils::HideOSChromeOnScreen(aFullScreen, [mWindow screen]);
   nsresult rv = nsBaseWidget::MakeFullScreen(aFullScreen);
   NSEnableScreenUpdates();
   NS_ENSURE_SUCCESS(rv, rv);
 
-  nsCocoaUtils::HideOSChromeOnScreen(aFullScreen, [mWindow screen]);
-
   mFullScreen = aFullScreen;
 
   return NS_OK;
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
 }