Index: ash/wm/workspace/auto_window_management.cc |
diff --git a/ash/wm/workspace/auto_window_management.cc b/ash/wm/workspace/auto_window_management.cc |
index 067ee9e3baad7715c7d26465706bd028f91c48e0..64a4564908764a5e3ff8d72041120986aa06170e 100644 |
--- a/ash/wm/workspace/auto_window_management.cc |
+++ b/ash/wm/workspace/auto_window_management.cc |
@@ -69,11 +69,18 @@ bool GetOtherVisibleAndManageableWindow(const aura::Window* window, |
} |
// Get the work area for a given |window|. |
-gfx::Rect GetWorkAreaForWindow(const aura::Window* window) { |
+gfx::Rect GetWorkAreaForWindow(aura::Window* window) { |
+#if defined(OS_WIN) |
+ // On Win 8, the host window can't be resized, so |
+ // use window's bounds instead. |
+ // TODO(oshima): Emulate host window resize on win8. |
gfx::Rect work_area = gfx::Rect(window->parent()->bounds().size()); |
work_area.Inset(Shell::GetScreen()->GetDisplayMatching( |
work_area).GetWorkAreaInsets()); |
return work_area; |
+#else |
+ return Shell::GetScreen()->GetDisplayNearestWindow(window).work_area(); |
+#endif |
} |
// Move the given |bounds| on the available |parent_width| to the |