Bug 1105939 part 2 - Suppress windows animation when hiding chrome on OS X. r=smichaud
authorXidorn Quan <quanxunzhen@gmail.com>
Thu, 04 Jun 2015 13:49:34 +1200
changeset 277860 237eb57fc917f0cf81640d7d22cc9aebca05784d
parent 277859 f2c75bb91474ff81674f6ea0df8b8ccb4fb96b94
child 277861 8aeee224c7582545c4c1b1be1aa9a24d7310d08f
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-beta@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmichaud
bugs1105939
milestone41.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 1105939 part 2 - Suppress windows animation when hiding chrome on OS X. r=smichaud
widget/cocoa/nsCocoaWindow.mm
--- a/widget/cocoa/nsCocoaWindow.mm
+++ b/widget/cocoa/nsCocoaWindow.mm
@@ -1247,17 +1247,20 @@ NS_IMETHODIMP nsCocoaWindow::HideWindowC
   // Reparent child windows.
   enumerator = [childWindows objectEnumerator];
   while ((child = [enumerator nextObject])) {
     [mWindow addChildWindow:child ordered:NSWindowAbove];
   }
 
   // Show the new window.
   if (isVisible) {
+    bool wasAnimationSuppressed = mIsAnimationSuppressed;
+    mIsAnimationSuppressed = true;
     rv = Show(true);
+    mIsAnimationSuppressed = wasAnimationSuppressed;
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   return NS_OK;
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
 }