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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/keyboard/keyboard_observer_register.h" | 9 #include "ash/keyboard/keyboard_observer_register.h" |
10 #include "ash/public/cpp/shell_window_ids.h" | 10 #include "ash/public/cpp/shell_window_ids.h" |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 UpdateShelfVisibility(); | 208 UpdateShelfVisibility(); |
209 } | 209 } |
210 } | 210 } |
211 | 211 |
212 void WorkspaceLayoutManager::OnWindowPropertyChanged(aura::Window* window, | 212 void WorkspaceLayoutManager::OnWindowPropertyChanged(aura::Window* window, |
213 const void* key, | 213 const void* key, |
214 intptr_t old) { | 214 intptr_t old) { |
215 if (key == aura::client::kAlwaysOnTopKey) { | 215 if (key == aura::client::kAlwaysOnTopKey) { |
216 if (window->GetProperty(aura::client::kAlwaysOnTopKey)) { | 216 if (window->GetProperty(aura::client::kAlwaysOnTopKey)) { |
217 aura::Window* container = | 217 aura::Window* container = |
218 root_window_controller_->always_on_top_controller() | 218 root_window_controller_->always_on_top_controller()->GetContainer( |
219 ->GetContainer(WmWindow::Get(window)) | 219 window); |
220 ->aura_window(); | |
221 if (window->parent() != container) | 220 if (window->parent() != container) |
222 container->AddChild(window); | 221 container->AddChild(window); |
223 } | 222 } |
224 } else if (key == aura::client::kHasBackdrop) { | 223 } else if (key == aura::client::kHasBackdrop) { |
225 backdrop_controller_->UpdateBackdrop(); | 224 backdrop_controller_->UpdateBackdrop(); |
226 } | 225 } |
227 } | 226 } |
228 | 227 |
229 void WorkspaceLayoutManager::OnWindowStackingChanged(aura::Window* window) { | 228 void WorkspaceLayoutManager::OnWindowStackingChanged(aura::Window* window) { |
230 UpdateShelfVisibility(); | 229 UpdateShelfVisibility(); |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 for (aura::Window* window : windows) { | 398 for (aura::Window* window : windows) { |
400 wm::WindowState* window_state = wm::GetWindowState(window); | 399 wm::WindowState* window_state = wm::GetWindowState(window); |
401 if (window_on_top) | 400 if (window_on_top) |
402 window_state->DisableAlwaysOnTop(window_on_top); | 401 window_state->DisableAlwaysOnTop(window_on_top); |
403 else | 402 else |
404 window_state->RestoreAlwaysOnTop(); | 403 window_state->RestoreAlwaysOnTop(); |
405 } | 404 } |
406 } | 405 } |
407 | 406 |
408 } // namespace ash | 407 } // namespace ash |
OLD | NEW |