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

Unified Diff: ash/screen_util.cc

Issue 1688453002: [exp] Always use the Display bounds. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/screen_util.cc
diff --git a/ash/screen_util.cc b/ash/screen_util.cc
index c27d896e52cb2e107fb31b7c1515aba754dc14f5..a858e4fb4a14c1dbf07c5814ee115d48a9964b40 100644
--- a/ash/screen_util.cc
+++ b/ash/screen_util.cc
@@ -65,7 +65,9 @@ gfx::Rect ScreenUtil::GetShelfDisplayBoundsInRoot(aura::Window* window) {
size.Scale(scale, scale);
return gfx::Rect(gfx::ToCeiledSize(size));
} else {
- return window->GetRootWindow()->bounds();
+ gfx::Display display =
+ gfx::Screen::GetScreen()->GetDisplayNearestWindow(window);
+ return gfx::Rect(display.size());
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698