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

Unified Diff: trunk/src/ash/display/screen_position_controller.cc

Issue 131543006: Revert 243986 "Fix AdjustBoundsToEnsureWindowVisibility to work ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 11 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 | « no previous file | trunk/src/ash/wm/dock/docked_window_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ash/display/screen_position_controller.cc
===================================================================
--- trunk/src/ash/display/screen_position_controller.cc (revision 244019)
+++ trunk/src/ash/display/screen_position_controller.cc (working copy)
@@ -11,7 +11,6 @@
#include "ash/wm/coordinate_conversion.h"
#include "ash/wm/system_modal_container_layout_manager.h"
#include "ash/wm/window_properties.h"
-#include "ash/wm/window_state.h"
#include "ui/aura/client/activation_client.h"
#include "ui/aura/client/capture_client.h"
#include "ui/aura/client/focus_client.h"
@@ -194,17 +193,6 @@
if (active && focused != active)
tracker.Add(active);
- window->parent()->RemoveChild(window);
-
- // Set new bounds now so that the container's layout manager
- // can adjust the bounds if necessary.
- gfx::Point origin = bounds.origin();
- const gfx::Point display_origin = display.bounds().origin();
- origin.Offset(-display_origin.x(), -display_origin.y());
- gfx::Rect new_bounds = gfx::Rect(origin, bounds.size());
-
- window->SetBounds(new_bounds);
-
dst_container->AddChild(window);
MoveAllTransientChildrenToNewRoot(display, window);
@@ -218,13 +206,9 @@
} else if (tracker.Contains(active)) {
activation_client->ActivateWindow(active);
}
- // TODO(oshima): We should not have to update the bounds again
- // below in theory, but we currently do need as there is a code
- // that assumes that the bounds will never be overridden by the
- // layout mananger. We should have more explicit control how
- // constraints are applied by the layout manager.
}
}
+
gfx::Point origin(bounds.origin());
const gfx::Point display_origin = Shell::GetScreen()->GetDisplayNearestWindow(
window).bounds().origin();
« no previous file with comments | « no previous file | trunk/src/ash/wm/dock/docked_window_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698