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

Unified Diff: trunk/src/ash/wm/workspace/auto_window_management.cc

Issue 19668011: Revert 213347 "Use GetDisplayNearestWindow instead of GetDislpa..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 5 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 | « trunk/src/ash/wm/drag_window_resizer.cc ('k') | trunk/src/ash/wm/workspace/frame_maximize_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ash/wm/workspace/auto_window_management.cc
===================================================================
--- trunk/src/ash/wm/workspace/auto_window_management.cc (revision 213355)
+++ trunk/src/ash/wm/workspace/auto_window_management.cc (working copy)
@@ -69,8 +69,11 @@
}
// 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
« no previous file with comments | « trunk/src/ash/wm/drag_window_resizer.cc ('k') | trunk/src/ash/wm/workspace/frame_maximize_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698