| Index: ash/shell.cc
|
| diff --git a/ash/shell.cc b/ash/shell.cc
|
| index 35eee4b23a7ebbdfb8ebb06eb3e409e474038631..74e21b83fe0af82a1b84a668fa758f591433bdef 100644
|
| --- a/ash/shell.cc
|
| +++ b/ash/shell.cc
|
| @@ -321,7 +321,9 @@ aura::RootWindow* Shell::GetRootWindowAt(const gfx::Point& point) {
|
| for (RootWindowList::const_iterator iter = root_windows.begin();
|
| iter != root_windows.end(); ++iter) {
|
| aura::RootWindow* root_window = *iter;
|
| - if (root_window->bounds().Contains(point))
|
| + const gfx::Display& display =
|
| + gfx::Screen::GetDisplayNearestWindow(root_window);
|
| + if (display.bounds().Contains(point))
|
| return root_window;
|
| }
|
| // Fallback to the primary window if there is no root window containing
|
| @@ -341,7 +343,9 @@ aura::RootWindow* Shell::GetRootWindowMatching(const gfx::Rect& rect) {
|
| for (RootWindowList::const_iterator iter = root_windows.begin();
|
| iter != root_windows.end(); ++iter) {
|
| aura::RootWindow* root_window = *iter;
|
| - gfx::Rect intersect = root_window->bounds().Intersect(rect);
|
| + const gfx::Display& display =
|
| + gfx::Screen::GetDisplayNearestWindow(root_window);
|
| + gfx::Rect intersect = display.bounds().Intersect(rect);
|
| int area = intersect.width() * intersect.height();
|
| if (area > max) {
|
| max = area;
|
|
|