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

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

Issue 19593008: Use GetDisplayNearestWindow instead of GetDislpaymatching where appropriate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win8 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 | « ash/wm/drag_window_resizer.cc ('k') | 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: 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
« no previous file with comments | « ash/wm/drag_window_resizer.cc ('k') | ash/wm/workspace/frame_maximize_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698