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

Unified Diff: ui/base/cocoa/fullscreen_window_manager.mm

Issue 635363002: Correct NSScreen comparison on PPAPI fullscreen switching (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698