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

Unified Diff: ash/wm/workspace/frame_maximize_button.cc

Issue 19593008: Use GetDisplayNearestWindow instead of GetDislpaymatching where appropriate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win8 Created 7 years, 5 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 | « ash/wm/workspace/auto_window_management.cc ('k') | chrome/browser/ui/views/chrome_views_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/frame_maximize_button.cc
diff --git a/ash/wm/workspace/frame_maximize_button.cc b/ash/wm/workspace/frame_maximize_button.cc
index f5ca58938c790fd0d089eef123b97e31ed3b1345..683ffc05ce07611cf1029d4fc495025ed31c0218 100644
--- a/ash/wm/workspace/frame_maximize_button.cc
+++ b/ash/wm/workspace/frame_maximize_button.cc
@@ -597,7 +597,8 @@ FrameMaximizeButton::GetMaximizeBubbleFrameState() const {
return FRAME_STATE_FULL;
// For Left/right maximize we need to check the dimensions.
gfx::Rect bounds = frame_->GetWidget()->GetWindowBoundsInScreen();
- gfx::Rect screen = Shell::GetScreen()->GetDisplayMatching(bounds).work_area();
+ gfx::Rect screen = Shell::GetScreen()->GetDisplayNearestWindow(
+ frame_->GetWidget()->GetNativeView()).work_area();
if (bounds.width() < (screen.width() * kMinSnapSizePercent) / 100)
return FRAME_STATE_NONE;
// We might still have a horizontally filled window at this point which we
« no previous file with comments | « ash/wm/workspace/auto_window_management.cc ('k') | chrome/browser/ui/views/chrome_views_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698