Index: ui/aura_shell/shell.cc |
diff --git a/ui/aura_shell/shell.cc b/ui/aura_shell/shell.cc |
index 358f29bd5248471531b2850f0da77a83cb39cb5f..c681366f61fd59c19bcd649a5fdd1b17d9e807db 100644 |
--- a/ui/aura_shell/shell.cc |
+++ b/ui/aura_shell/shell.cc |
@@ -5,6 +5,7 @@ |
#include "ui/aura_shell/shell.h" |
#include "base/bind.h" |
+#include "ui/aura/aura_constants.h" |
#include "ui/aura/desktop.h" |
#include "ui/aura/screen_aura.h" |
#include "ui/aura/toplevel_window_container.h" |
@@ -84,6 +85,8 @@ Shell::Shell() |
} |
Shell::~Shell() { |
+ if (instance_ == this); |
+ instance_ = NULL; |
} |
// static |
@@ -161,7 +164,10 @@ void Shell::AddChildToDefaultParent(aura::Window* window) { |
switch (window->type()) { |
case aura::WINDOW_TYPE_NORMAL: |
case aura::WINDOW_TYPE_POPUP: |
- parent = GetContainer(internal::kShellWindowId_DefaultContainer); |
+ if (!!window->GetProperty(aura::kAlwaysOnTopKey)) |
+ parent = GetContainer(internal::kShellWindowId_AlwaysOnTopContainer); |
+ else |
+ parent = GetContainer(internal::kShellWindowId_DefaultContainer); |
break; |
case aura::WINDOW_TYPE_MENU: |
case aura::WINDOW_TYPE_TOOLTIP: |