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

Unified Diff: ash/shell.cc

Issue 10696002: ASH: Use virtual screen coordinates in Display::bounds() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 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
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index d84b700d6f308ce68b9d6dcc5d08b58092a1efc8..36cf332b9e9d24f42249da346ee6a0b263818336 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;

Powered by Google App Engine
This is Rietveld 408576698