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

Unified Diff: chrome/browser/ui/window_sizer/window_sizer_ash.cc

Issue 11085053: Improving window auto management between workspaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed a part of the change which slipped in through a branch switch and eclipse usage Created 8 years, 2 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
Index: chrome/browser/ui/window_sizer/window_sizer_ash.cc
diff --git a/chrome/browser/ui/window_sizer/window_sizer_ash.cc b/chrome/browser/ui/window_sizer/window_sizer_ash.cc
index 30093e6eec386d8089a80a05f355b465836adfc1..519680e899b758fed3e9ab1bd67215c2e6cb12f7 100644
--- a/chrome/browser/ui/window_sizer/window_sizer_ash.cc
+++ b/chrome/browser/ui/window_sizer/window_sizer_ash.cc
@@ -156,22 +156,14 @@ bool WindowSizer::GetBoundsOverrideAsh(const gfx::Rect& specified_bounds,
if (maximized)
return true;
- gfx::Rect other_bounds_in_screen = top_window->GetBoundsInScreen();
- bool move_right =
- other_bounds_in_screen.CenterPoint().x() < work_area.CenterPoint().x();
-
- // In case we have only one window, we move the other window fully to the
- // "other side" - making room for this new window.
- if (count == 1) {
- gfx::Display display = ash::Shell::GetScreen()->GetDisplayMatching(
- top_window->GetRootWindow()->GetBoundsInScreen());
- if (MoveRect(work_area, other_bounds_in_screen, !move_right))
- top_window->SetBoundsInScreen(other_bounds_in_screen, display);
- }
// Use the size of the other window, and mirror the location to the
// opposite side. Then make sure that it is inside our work area
// (if possible).
- *bounds_in_screen = other_bounds_in_screen;
+ *bounds_in_screen = top_window->GetBoundsInScreen();
+
+ bool move_right =
+ bounds_in_screen->CenterPoint().x() < work_area.CenterPoint().x();
+
MoveRect(work_area, *bounds_in_screen, move_right);
if (bounds_in_screen->bottom() > work_area.bottom())
bounds_in_screen->set_y(std::max(work_area.y(),

Powered by Google App Engine
This is Rietveld 408576698