Chromium Code Reviews| Index: ash/display/screen_position_controller.cc |
| diff --git a/ash/display/screen_position_controller.cc b/ash/display/screen_position_controller.cc |
| index c8b8c1d7562e6172aaafada3f77134175277ae1a..02166d06b2699e1fad469ab17cc163beb8c4cfa5 100644 |
| --- a/ash/display/screen_position_controller.cc |
| +++ b/ash/display/screen_position_controller.cc |
| @@ -192,6 +192,18 @@ void ScreenPositionController::SetBounds(aura::Window* window, |
| if (active && focused != active) |
| tracker.Add(active); |
| + // Adjust the bounds before reparenting since the bounds may be taken |
| + // into consideration to ensure window visibility when it gets added |
| + // to layout. |
| + if (window->type() != aura::client::WINDOW_TYPE_POPUP) { |
| + gfx::Point origin(bounds.origin()); |
| + const gfx::Point display_origin = |
| + Shell::GetScreen()->GetDisplayNearestWindow( |
| + dst_container).bounds().origin(); |
| + origin.Offset(-display_origin.x(), -display_origin.y()); |
| + gfx::Rect new_bounds(gfx::Rect(origin, bounds.size())); |
| + window->SetBounds(new_bounds); |
| + } |
|
flackr
2013/11/01 16:52:28
This doesn't look related to simply enabling docke
varkha
2013/11/05 20:34:23
Done. https://codereview.chromium.org/57963003/
|
| dst_container->AddChild(window); |
| MoveAllTransientChildrenToNewRoot(display, window); |
| @@ -205,6 +217,8 @@ void ScreenPositionController::SetBounds(aura::Window* window, |
| } else if (tracker.Contains(active)) { |
| activation_client->ActivateWindow(active); |
| } |
| + if (window->type() != aura::client::WINDOW_TYPE_POPUP) |
| + return; |
| } |
| } |