Bug 1045000, deminiaturize before making the window key to fix flickering window, r=smichaud
authorNeil Deakin <neil@mozilla.com>
Tue, 19 Aug 2014 20:01:32 -0400
changeset 214800 cee63e83abfb8a6f57b5b047b12cafdb0da809a3
parent 214799 94d8ee70f149522edb0de6327d61164b1dff80a4
child 214801 01a1476ba31bb1f496f6e47442d129007cb4abdd
push idunknown
push userunknown
push dateunknown
reviewerssmichaud
bugs1045000
milestone34.0a1
Bug 1045000, deminiaturize before making the window key to fix flickering window, r=smichaud
widget/cocoa/nsCocoaWindow.mm
--- a/widget/cocoa/nsCocoaWindow.mm
+++ b/widget/cocoa/nsCocoaWindow.mm
@@ -1785,16 +1785,20 @@ NS_IMETHODIMP nsCocoaWindow::SetFocus(bo
 {
   if (!mWindow)
     return NS_OK;
 
   if (mPopupContentView) {
     mPopupContentView->SetFocus(aState);
   }
   else if (aState && ([mWindow isVisible] || [mWindow isMiniaturized])) {
+    if ([mWindow isMiniaturized]) {
+      [mWindow deminiaturize:nil];
+    }
+
     [mWindow makeKeyAndOrderFront:nil];
     SendSetZLevelEvent();
   }
 
   return NS_OK;
 }
 
 nsIntPoint nsCocoaWindow::WidgetToScreenOffset()