| 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/base_layout_manager.h" | 5 #include "ash/wm/base_layout_manager.h" |
| 6 | 6 |
| 7 #include "ash/screen_ash.h" | 7 #include "ash/screen_ash.h" |
| 8 #include "ash/session_state_delegate.h" | 8 #include "ash/session_state_delegate.h" |
| 9 #include "ash/shelf/shelf_layout_manager.h" | 9 #include "ash/shelf/shelf_layout_manager.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 const gfx::Rect& new_bounds) { | 147 const gfx::Rect& new_bounds) { |
| 148 if (root_window_ == window) | 148 if (root_window_ == window) |
| 149 AdjustAllWindowsBoundsForWorkAreaChange(ADJUST_WINDOW_DISPLAY_SIZE_CHANGED); | 149 AdjustAllWindowsBoundsForWorkAreaChange(ADJUST_WINDOW_DISPLAY_SIZE_CHANGED); |
| 150 } | 150 } |
| 151 | 151 |
| 152 ////////////////////////////////////////////////////////////////////////////// | 152 ////////////////////////////////////////////////////////////////////////////// |
| 153 // BaseLayoutManager, aura::client::ActivationChangeObserver implementation: | 153 // BaseLayoutManager, aura::client::ActivationChangeObserver implementation: |
| 154 | 154 |
| 155 void BaseLayoutManager::OnWindowActivated(aura::Window* gained_active, | 155 void BaseLayoutManager::OnWindowActivated(aura::Window* gained_active, |
| 156 aura::Window* lost_active) { | 156 aura::Window* lost_active) { |
| 157 if (views::corewm::UseFocusController()) { | 157 if (gained_active && wm::IsWindowMinimized(gained_active) && |
| 158 if (gained_active && wm::IsWindowMinimized(gained_active) && | 158 !gained_active->IsVisible()) { |
| 159 !gained_active->IsVisible()) { | 159 gained_active->Show(); |
| 160 gained_active->Show(); | 160 DCHECK(!wm::IsWindowMinimized(gained_active)); |
| 161 DCHECK(!wm::IsWindowMinimized(gained_active)); | |
| 162 } | |
| 163 } | 161 } |
| 164 } | 162 } |
| 165 | 163 |
| 166 ////////////////////////////////////////////////////////////////////////////// | 164 ////////////////////////////////////////////////////////////////////////////// |
| 167 // BaseLayoutManager, protected: | 165 // BaseLayoutManager, protected: |
| 168 | 166 |
| 169 void BaseLayoutManager::ShowStateChanged(aura::Window* window, | 167 void BaseLayoutManager::ShowStateChanged(aura::Window* window, |
| 170 ui::WindowShowState last_show_state) { | 168 ui::WindowShowState last_show_state) { |
| 171 if (wm::IsWindowMinimized(window)) { | 169 if (wm::IsWindowMinimized(window)) { |
| 172 // Save the previous show state so that we can correctly restore it. | 170 // Save the previous show state so that we can correctly restore it. |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 window, ScreenAsh::GetDisplayBoundsInParent(window)); | 263 window, ScreenAsh::GetDisplayBoundsInParent(window)); |
| 266 break; | 264 break; |
| 267 | 265 |
| 268 default: | 266 default: |
| 269 break; | 267 break; |
| 270 } | 268 } |
| 271 } | 269 } |
| 272 | 270 |
| 273 } // namespace internal | 271 } // namespace internal |
| 274 } // namespace ash | 272 } // namespace ash |
| OLD | NEW |