Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(491)

Unified Diff: chrome/browser/ui/cocoa/framed_browser_window.mm

Issue 520733004: mac, yosemite: Resize button causes fullscreen effect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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:@""];

Powered by Google App Engine
This is Rietveld 408576698