Index: chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm |
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm |
index 1a92665d0bc26cebc3141010be147c47ec5b5c6d..6e0e95aa38d8d3faf497f4b244b6f503c8763336 100644 |
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm |
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm |
@@ -265,10 +265,12 @@ const NSTimeInterval kTearDuration = 0.333; |
// Disable window animation before calling |orderFront:| when detatching |
// to a new window. |
NSWindowAnimationBehavior savedAnimationBehavior = 0; |
Mark Mentovai
2011/08/31 18:47:01
Get rid of the initializer like you did in the oth
dhollowa
2011/08/31 18:57:17
Done.
|
+ bool didSaveAnimationBehavior = false; |
if ([dragWindow_ respondsToSelector:@selector(animationBehavior)] && |
[dragWindow_ respondsToSelector:@selector(setAnimationBehavior:)]) { |
savedAnimationBehavior = [dragWindow_ animationBehavior]; |
[dragWindow_ setAnimationBehavior:NSWindowAnimationBehaviorNone]; |
+ didSaveAnimationBehavior = true; |
Mark Mentovai
2011/08/31 18:47:01
Move this one up like you did in the other file.
dhollowa
2011/08/31 18:57:17
Done.
|
} |
// If dragging the tab only moves the current window, do not show overlay |
@@ -285,11 +287,9 @@ const NSTimeInterval kTearDuration = 0.333; |
tearTime_ = [NSDate timeIntervalSinceReferenceDate]; |
tearOrigin_ = sourceWindowFrame_.origin; |
- // Restore window animation behavior |
- if ([dragWindow_ respondsToSelector:@selector(animationBehavior)] && |
- [dragWindow_ respondsToSelector:@selector(setAnimationBehavior:)]) { |
+ // Restore window animation behavior. |
+ if (didSaveAnimationBehavior) |
[dragWindow_ setAnimationBehavior:savedAnimationBehavior]; |
- } |
} |
// TODO(pinkerton): http://crbug.com/25682 demonstrates a way to get here by |