Bug 516027 - Tools->Downloads does not restore a minimized download window. r=josh a1.9.2.6=LegNeato
authorBarry K. Nathan <barryn@pobox.com>
Wed, 03 Feb 2010 13:42:12 +0100
changeset 34381 8686a1a62d3ee3488ba99d5e865a28c9fc00f357
parent 34380 34c868ca9c889d75dd6a1642d651837c1c9d6886
child 34382 2a4412197a18246b3fbc53d23a9ba6b1bfbb16fe
push id1430
push usereakhgari@mozilla.com
push dateFri, 25 Jun 2010 20:52:55 +0000
reviewersjosh
bugs516027
milestone1.9.2.6pre
Bug 516027 - Tools->Downloads does not restore a minimized download window. r=josh a1.9.2.6=LegNeato
widget/src/cocoa/nsCocoaWindow.mm
--- a/widget/src/cocoa/nsCocoaWindow.mm
+++ b/widget/src/cocoa/nsCocoaWindow.mm
@@ -1335,18 +1335,17 @@ void nsCocoaWindow::SetMenuBar(nsMenuBar
     mMenuBar->Paint();
 }
 
 NS_IMETHODIMP nsCocoaWindow::SetFocus(PRBool aState)
 {
   if (mPopupContentView) {
     mPopupContentView->SetFocus(aState);
   }
-  else if (aState && [mWindow isVisible]) {
-    // if the window is shown, move it to the front
+  else if (aState && ([mWindow isVisible] || [mWindow isMiniaturized])) {
     [mWindow setAcceptsMouseMovedEvents:YES];
     [mWindow makeKeyAndOrderFront:nil];
     SendSetZLevelEvent();
   }
 
   return NS_OK;
 }