Index: ui/base/cocoa/fullscreen_window_manager.mm |
diff --git a/ui/base/cocoa/fullscreen_window_manager.mm b/ui/base/cocoa/fullscreen_window_manager.mm |
index 8482168b5a5de026a96170bf5e075c01416c5890..15a5948a7b0bfc8518e945bb6ba0055faa20f73f 100644 |
--- a/ui/base/cocoa/fullscreen_window_manager.mm |
+++ b/ui/base/cocoa/fullscreen_window_manager.mm |
@@ -85,15 +85,18 @@ NSScreen* GetDockScreen() { |
} |
- (void)update { |
+ // From OS X 10.10, NSApplicationDidChangeScreenParametersNotification is sent |
+ // when displaying a fullscreen window, which should normally only be sent if |
+ // the monitor resolution has changed or new display is detected. |
if (![[NSScreen screens] containsObject:desiredScreen_]) |
desiredScreen_.reset([[window_ screen] retain]); |
base::mac::FullScreenMode newMode; |
if (!fullscreenActive_) |
newMode = base::mac::kFullScreenModeNormal; |
- else if (desiredScreen_ == GetMenuBarScreen()) |
+ else if ([desiredScreen_ isEqual:GetMenuBarScreen()]) |
newMode = base::mac::kFullScreenModeHideAll; |
- else if (desiredScreen_ == GetDockScreen()) |
+ else if ([desiredScreen_ isEqual:GetDockScreen()]) |
newMode = base::mac::kFullScreenModeHideDock; |
else |
newMode = base::mac::kFullScreenModeNormal; |