Index: chrome/browser/ui/cocoa/framed_browser_window.mm |
diff --git a/chrome/browser/ui/cocoa/framed_browser_window.mm b/chrome/browser/ui/cocoa/framed_browser_window.mm |
index 0989b6a543f296e73e36b5b2484fd6ef7cd14ef1..6f8ff0691ccccd8b5e682873cb562e881b0ccdef 100644 |
--- a/chrome/browser/ui/cocoa/framed_browser_window.mm |
+++ b/chrome/browser/ui/cocoa/framed_browser_window.mm |
@@ -5,6 +5,7 @@ |
#import "chrome/browser/ui/cocoa/framed_browser_window.h" |
#include "base/logging.h" |
+#include "base/mac/scoped_nsobject.h" |
#include "base/mac/sdk_forward_declarations.h" |
#include "chrome/browser/global_keyboard_shortcuts_mac.h" |
#include "chrome/browser/profiles/profile_avatar_icon_util.h" |
@@ -72,6 +73,15 @@ const CGFloat kWindowGradientHeight = 24.0; |
styleMask:styleMask |
backing:NSBackingStoreBuffered |
defer:YES])) { |
+ // In Yosemite, no views can be in front of the traffic lights controls in |
+ // the top left of the window. This affects both the content view and the |
+ // tab strip view. The tab strip is added directly above the content view, |
+ // so moving the content view to the back fixes the problem. |
+ base::scoped_nsobject<NSView> contentView([[self contentView] retain]); |
+ NSView* superview = [contentView superview]; |
+ [contentView removeFromSuperview]; |
+ [superview addSubview:contentView positioned:NSWindowBelow relativeTo:nil]; |
+ |
// The 10.6 fullscreen code copies the title to a different window, which |
// will assert if it's nil. |
[self setTitle:@""]; |