| Index: ash/wm/workspace/workspace_layout_manager.cc
|
| diff --git a/ash/wm/workspace/workspace_layout_manager.cc b/ash/wm/workspace/workspace_layout_manager.cc
|
| index e4e6c841e0208d8856a54a0cd53a6853d8c3128b..69230152bcb4238b779e2acd06e26a7fec16ac95 100644
|
| --- a/ash/wm/workspace/workspace_layout_manager.cc
|
| +++ b/ash/wm/workspace/workspace_layout_manager.cc
|
| @@ -8,8 +8,10 @@
|
| #include "ash/screen_ash.h"
|
| #include "ash/session_state_delegate.h"
|
| #include "ash/shell.h"
|
| +#include "ash/shell_window_ids.h"
|
| #include "ash/wm/always_on_top_controller.h"
|
| #include "ash/wm/base_layout_manager.h"
|
| +#include "ash/wm/dock/dock_edge_types.h"
|
| #include "ash/wm/window_animations.h"
|
| #include "ash/wm/window_properties.h"
|
| #include "ash/wm/window_util.h"
|
| @@ -48,7 +50,7 @@ void BuildWindowBoundsMap(const aura::Window* window, BoundsMap* bounds_map) {
|
| BuildWindowBoundsMap(window->children()[i], bounds_map);
|
| }
|
|
|
| -// Resets |window|s bounds from |bounds_map| if currently empty. Recusively
|
| +// Resets |window|s bounds from |bounds_map| if currently empty. Recursively
|
| // invokes this for all children.
|
| void ResetBoundsIfNecessary(const BoundsMap& bounds_map, aura::Window* window) {
|
| if (window->bounds().IsEmpty() && window->GetTargetBounds().IsEmpty()) {
|
| @@ -61,7 +63,7 @@ void ResetBoundsIfNecessary(const BoundsMap& bounds_map, aura::Window* window) {
|
| }
|
|
|
| // Resets |window|s bounds from |bounds_map| if |window| is marked as a
|
| -// constrained window. Recusively invokes this for all children.
|
| +// constrained window. Recursively invokes this for all children.
|
| // TODO(sky): this should key off window type.
|
| void ResetConstrainedWindowBoundsIfNecessary(const BoundsMap& bounds_map,
|
| aura::Window* window) {
|
| @@ -97,6 +99,7 @@ WorkspaceLayoutManager::~WorkspaceLayoutManager() {
|
| }
|
|
|
| void WorkspaceLayoutManager::OnWindowAddedToLayout(Window* child) {
|
| + LOG(INFO) << this << " OnWindowAddedToLayout " << child;
|
| // Adjust window bounds in case that the new child is out of the workspace.
|
| AdjustWindowSizeForScreenChange(child, ADJUST_WINDOW_WINDOW_ADDED);
|
|
|
| @@ -118,6 +121,7 @@ void WorkspaceLayoutManager::OnWillRemoveWindowFromLayout(Window* child) {
|
| }
|
|
|
| void WorkspaceLayoutManager::OnWindowRemovedFromLayout(Window* child) {
|
| + LOG(INFO) << this << " OnWindowRemovedFromLayout " << child;
|
| workspace_manager()->OnWindowRemovedFromWorkspace(workspace_, child);
|
| }
|
|
|
| @@ -241,6 +245,21 @@ void WorkspaceLayoutManager::OnWindowPropertyChanged(Window* window,
|
| internal::kAlwaysOnTopControllerKey);
|
| controller->GetContainer(window)->AddChild(window);
|
| }
|
| +
|
| + if (key == ash::internal::kDockEdges &&
|
| + GetDockEdges(window) != static_cast<int>(old)) {
|
| + LOG(INFO) << "Stuck property changed to " << GetDockEdges(window);
|
| + aura::Window* dock_container = ash::Shell::GetContainer(
|
| + root_window_,
|
| + ash::internal::kShellWindowId_DockContainer);
|
| + DCHECK(dock_container);
|
| + int edges = GetDockEdges(window) & (DOCK_EDGE_RIGHT | DOCK_EDGE_LEFT);
|
| + if (edges &&
|
| + 0 == (static_cast<int>(old) & (DOCK_EDGE_RIGHT | DOCK_EDGE_LEFT))) {
|
| + LOG(INFO) << "adding " << window << " to dock " << dock_container;
|
| + dock_container->AddChild(window);
|
| + }
|
| + }
|
| }
|
|
|
| void WorkspaceLayoutManager::OnWindowDestroying(aura::Window* window) {
|
|
|