diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-24 07:15:13 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-24 07:15:13 +0000 |
commit | 8ded3efe7d919bd27c3109146e4a0d47a266b01a (patch) | |
tree | a1deb19f28c19211d2e35d701ef8654cb82be0af /ash/wm/workspace | |
parent | 1fc9e80dab903b1dddf3b219c9f4fb45568e090b (diff) | |
download | chromium_src-8ded3efe7d919bd27c3109146e4a0d47a266b01a.zip chromium_src-8ded3efe7d919bd27c3109146e4a0d47a266b01a.tar.gz chromium_src-8ded3efe7d919bd27c3109146e4a0d47a266b01a.tar.bz2 |
Revert 213347 "Use GetDisplayNearestWindow instead of GetDislpa..."
I suspect this broke WorkspaceManagerTest on Win8 Aura
http://build.chromium.org/p/chromium.win/builders/Win8%20Aura/builds/8306
> Use GetDisplayNearestWindow instead of GetDislpaymatching where appropriate
> This is correct way to tell on which display
> the window is on as a window doesn't overlap two
> displays on ash.
>
> BUG=none
>
> Review URL: https://chromiumcodereview.appspot.com/19593008
TBR=oshima@chromium.org
Review URL: https://codereview.chromium.org/19668011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213356 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm/workspace')
-rw-r--r-- | ash/wm/workspace/auto_window_management.cc | 7 | ||||
-rw-r--r-- | ash/wm/workspace/frame_maximize_button.cc | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/ash/wm/workspace/auto_window_management.cc b/ash/wm/workspace/auto_window_management.cc index f6356bf..067ee9e 100644 --- a/ash/wm/workspace/auto_window_management.cc +++ b/ash/wm/workspace/auto_window_management.cc @@ -69,8 +69,11 @@ bool GetOtherVisibleAndManageableWindow(const aura::Window* window, } // Get the work area for a given |window|. -gfx::Rect GetWorkAreaForWindow(aura::Window* window) { - return Shell::GetScreen()->GetDisplayNearestWindow(window).work_area(); +gfx::Rect GetWorkAreaForWindow(const aura::Window* window) { + gfx::Rect work_area = gfx::Rect(window->parent()->bounds().size()); + work_area.Inset(Shell::GetScreen()->GetDisplayMatching( + work_area).GetWorkAreaInsets()); + return work_area; } // Move the given |bounds| on the available |parent_width| to the 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 |