Chromium Code Reviews| Index: ash/wm/stacking_controller.cc |
| diff --git a/ash/wm/stacking_controller.cc b/ash/wm/stacking_controller.cc |
| index 3802440be6da86583f1893ddfd66be6879552de9..3590da7c016353da606f57d86438d7c860471bca 100644 |
| --- a/ash/wm/stacking_controller.cc |
| +++ b/ash/wm/stacking_controller.cc |
| @@ -128,13 +128,15 @@ aura::Window* StackingController::GetSystemModalContainer( |
| // Otherwise those that originate from LockScreen container and above are |
| // placed in the screen lock modal container. |
| - aura::Window* lock_container = |
| - GetContainerById(root, internal::kShellWindowId_LockScreenContainer); |
| - int lock_container_id = lock_container->id(); |
| - int window_container_id = window->transient_parent()->parent()->id(); |
| + |
| + // Transient parent for window can be NULL for alerts from background pages |
| + // assume that all such alerts belong to user session. |
| + int window_container_id = window->transient_parent() ? |
|
sky
2013/05/30 14:53:47
This code would be less mysterious if you made it
Dmitry Polukhin
2013/05/30 15:09:02
Done.
|
| + window->transient_parent()->parent()->id() : |
| + internal::kShellWindowId_WorkspaceContainer; |
| aura::Window* container = NULL; |
| - if (window_container_id < lock_container_id) { |
| + if (window_container_id < internal::kShellWindowId_LockScreenContainer) { |
| container = GetContainerById( |
| root, internal::kShellWindowId_SystemModalContainer); |
| } else { |