Chromium Code Reviews| Index: athena/screen/screen_manager_impl.cc |
| diff --git a/athena/screen/screen_manager_impl.cc b/athena/screen/screen_manager_impl.cc |
| index a154d522f2edcec74117a63d3aacab35e7fd2054..3671be383e443802e74046f2215a8096ac751538 100644 |
| --- a/athena/screen/screen_manager_impl.cc |
| +++ b/athena/screen/screen_manager_impl.cc |
| @@ -25,6 +25,7 @@ |
| #include "ui/wm/core/base_focus_rules.h" |
| #include "ui/wm/core/capture_controller.h" |
| #include "ui/wm/core/focus_controller.h" |
| +#include "ui/wm/core/window_util.h" |
| namespace athena { |
| namespace { |
| @@ -95,6 +96,13 @@ class AthenaWindowTreeClient : public aura::client::WindowTreeClient { |
| virtual aura::Window* GetDefaultParent(aura::Window* context, |
| aura::Window* window, |
| const gfx::Rect& bounds) OVERRIDE { |
| + aura::Window* transient_parent = wm::GetTransientParent(window); |
| + if (transient_parent) { |
| + aura::Window* container = transient_parent->parent(); |
| + while (container && container->type() != ui::wm::WINDOW_TYPE_UNKNOWN) |
| + container = container->parent(); |
| + return container; |
|
oshima
2014/09/04 00:23:35
can you check if the window has ContainerParams in
mohsen
2014/09/04 14:57:22
I just saw that there is a GetContainer() function
|
| + } |
| return container_; |
| } |