| Index: ash/common/wm/container_finder.cc
|
| diff --git a/ash/common/wm/container_finder.cc b/ash/common/wm/container_finder.cc
|
| index 6eb05a38a211beb68dfd1ecafc2932749f1e00c2..1d954287525f490dbe6166ffbbe84a3ee8f4fbfa 100644
|
| --- a/ash/common/wm/container_finder.cc
|
| +++ b/ash/common/wm/container_finder.cc
|
| @@ -60,10 +60,11 @@ WmWindow* GetContainerFromAlwaysOnTopController(WmWindow* root,
|
| } // namespace
|
|
|
| WmWindow* GetContainerForWindow(WmWindow* window) {
|
| - WmWindow* container = window->GetParent();
|
| - while (container && container->GetType() != ui::wm::WINDOW_TYPE_UNKNOWN)
|
| - container = container->GetParent();
|
| - return container;
|
| + WmWindow* parent = window->GetParent();
|
| + // The first parent with an explicit shell window ID is the container.
|
| + while (parent && parent->GetShellWindowId() == kShellWindowId_Invalid)
|
| + parent = parent->GetParent();
|
| + return parent;
|
| }
|
|
|
| WmWindow* GetDefaultParent(WmWindow* context,
|
|
|