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

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

Issue 1062053002: Fix docked browser window sometimes appears onscreen after restart (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revise unit test Created 5 years, 8 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 | chrome/browser/ui/cocoa/browser_window_cocoa_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/browser_window_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.mm b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
index 95c39c30ce808bbacb319cffb55ad556d2e13b20..160eb6b9a22f6e3714ee9c3b9fef47cf4bd9162f 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
@@ -363,7 +363,10 @@ gfx::Rect BrowserWindowCocoa::GetBounds() const {
}
bool BrowserWindowCocoa::IsMaximized() const {
- return [window() isZoomed];
+ // -isZoomed returns YES if the window's frame equals the rect returned by
+ // -windowWillUseStandardFrame:defaultFrame:, even if the window is in the
+ // dock, so have to explicitly check for miniaturization state first.
+ return ![window() isMiniaturized] && [window() isZoomed];
}
bool BrowserWindowCocoa::IsMinimized() const {
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/browser_window_cocoa_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698