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 |