summaryrefslogtreecommitdiffstats
path: root/ash/wm/workspace/frame_maximize_button.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ash/wm/workspace/frame_maximize_button.cc')
-rw-r--r--ash/wm/workspace/frame_maximize_button.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/ash/wm/workspace/frame_maximize_button.cc b/ash/wm/workspace/frame_maximize_button.cc
index 683ffc0..f5ca589 100644
--- a/ash/wm/workspace/frame_maximize_button.cc
+++ b/ash/wm/workspace/frame_maximize_button.cc
@@ -597,8 +597,7 @@ 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()->GetDisplayNearestWindow(
- frame_->GetWidget()->GetNativeView()).work_area();
+ gfx::Rect screen = Shell::GetScreen()->GetDisplayMatching(bounds).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