OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/wm/workspace/workspace_layout_manager.h" | 5 #include "ash/wm/workspace/workspace_layout_manager.h" |
6 | 6 |
7 #include "ash/screen_ash.h" | 7 #include "ash/screen_ash.h" |
8 #include "ash/wm/window_util.h" | 8 #include "ash/wm/window_util.h" |
9 #include "ash/wm/window_properties.h" | 9 #include "ash/wm/window_properties.h" |
10 #include "ash/wm/workspace/workspace.h" | 10 #include "ash/wm/workspace/workspace.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 aura::Window* window, | 99 aura::Window* window, |
100 ui::WindowShowState last_show_state) { | 100 ui::WindowShowState last_show_state) { |
101 if (workspace_manager_->ShouldManageWindow(window)) { | 101 if (workspace_manager_->ShouldManageWindow(window)) { |
102 if (wm::IsWindowMinimized(window)) { | 102 if (wm::IsWindowMinimized(window)) { |
103 workspace_manager_->RemoveWindow(window); | 103 workspace_manager_->RemoveWindow(window); |
104 } else if ((window->TargetVisibility() || | 104 } else if ((window->TargetVisibility() || |
105 last_show_state == ui::SHOW_STATE_MINIMIZED) && | 105 last_show_state == ui::SHOW_STATE_MINIMIZED) && |
106 !workspace_manager_->Contains(window)) { | 106 !workspace_manager_->Contains(window)) { |
107 workspace_manager_->AddWindow(window); | 107 workspace_manager_->AddWindow(window); |
108 } | 108 } |
109 } else { | |
110 workspace_manager_->UpdateShelfVisibility(); | |
111 } | 109 } |
112 BaseLayoutManager::ShowStateChanged(window, last_show_state); | 110 BaseLayoutManager::ShowStateChanged(window, last_show_state); |
113 workspace_manager_->ShowStateChanged(window); | 111 workspace_manager_->ShowStateChanged(window); |
| 112 // As BaseLayoutManager::ShowStateChanged() may change the visibility of the |
| 113 // window we need to invoke UpdateShelfVisibility() after ShowStateChanged(). |
| 114 workspace_manager_->UpdateShelfVisibility(); |
114 } | 115 } |
115 | 116 |
116 } // namespace internal | 117 } // namespace internal |
117 } // namespace ash | 118 } // namespace ash |
OLD | NEW |