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

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: sync 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
« no previous file with comments | « ash/screen_ash.cc ('k') | chrome/browser/ui/webui/options2/chromeos/display_options_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « ash/screen_ash.cc ('k') | chrome/browser/ui/webui/options2/chromeos/display_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698