| Index: ash/wm/workspace/workspace_manager.cc
|
| ===================================================================
|
| --- ash/wm/workspace/workspace_manager.cc (revision 139956)
|
| +++ ash/wm/workspace/workspace_manager.cc (working copy)
|
| @@ -30,17 +30,13 @@
|
|
|
| namespace {
|
|
|
| -// Returns a list of all the windows with layers in |result|. Optionally
|
| -// ignores the window |ignore_window|.
|
| +// Returns a list of all the windows with layers in |result|.
|
| void BuildWindowList(const std::vector<aura::Window*>& windows,
|
| - aura::Window* ignore_window,
|
| std::vector<aura::Window*>* result) {
|
| for (size_t i = 0; i < windows.size(); ++i) {
|
| - if (windows[i] == ignore_window)
|
| - continue;
|
| if (windows[i]->layer())
|
| result->push_back(windows[i]);
|
| - BuildWindowList(windows[i]->transient_children(), ignore_window, result);
|
| + BuildWindowList(windows[i]->transient_children(), result);
|
| }
|
| }
|
|
|
| @@ -55,7 +51,7 @@
|
| WorkspaceManager::WorkspaceManager(aura::Window* contents_view)
|
| : contents_view_(contents_view),
|
| active_workspace_(NULL),
|
| - maximize_restore_window_(NULL),
|
| + ignored_window_(NULL),
|
| grid_size_(0),
|
| shelf_(NULL) {
|
| DCHECK(contents_view);
|
| @@ -216,7 +212,7 @@
|
| AnimateChangeType change_type,
|
| bool value) {
|
| std::vector<aura::Window*> children;
|
| - BuildWindowList(workspace->windows(), maximize_restore_window_, &children);
|
| + BuildWindowList(workspace->windows(), &children);
|
| SetWindowLayerVisibility(children, change_type, value);
|
| }
|
|
|
| @@ -293,7 +289,9 @@
|
|
|
| void WorkspaceManager::SetWindowBounds(aura::Window* window,
|
| const gfx::Rect& bounds) {
|
| + ignored_window_ = window;
|
| window->SetBounds(bounds);
|
| + ignored_window_ = NULL;
|
| }
|
|
|
| void WorkspaceManager::OnTypeOfWorkspacedNeededChanged(aura::Window* window) {
|
| @@ -314,9 +312,7 @@
|
| new_workspace = CreateWorkspace(Workspace::TYPE_MANAGED);
|
| new_workspace->AddWindowAfter(window, NULL);
|
| }
|
| - maximize_restore_window_ = window;
|
| SetActiveWorkspace(new_workspace);
|
| - maximize_restore_window_ = NULL;
|
| // Delete at the end so that we don't attempt to switch to another
|
| // workspace in RemoveWorkspace().
|
| CleanupWorkspace(current_workspace);
|
|
|