Bug 526282 - Minimize button disabled after full screen mode on Mac OS 10.6. r=josh, a1.9.2.5=LegNeato
authorMarkus Stange <mstange@themasta.com>
Wed, 13 Jan 2010 17:17:57 +0100
changeset 34204 869990a16d068b9cae466864649f377ee9455f3b
parent 34203 739f3aed61875a522aa53e9e1c2de2ea0c4b757c
child 34205 b506cd49c9158b6ed3610dab061fb8e27d277a88
push id1322
push usermstange@themasta.com
push dateFri, 14 May 2010 10:31:23 +0000
reviewersjosh
bugs526282
milestone1.9.2.5pre
Bug 526282 - Minimize button disabled after full screen mode on Mac OS 10.6. r=josh, a1.9.2.5=LegNeato
widget/src/cocoa/nsCocoaWindow.mm
--- a/widget/src/cocoa/nsCocoaWindow.mm
+++ b/widget/src/cocoa/nsCocoaWindow.mm
@@ -1024,22 +1024,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;
 }