| Index: ash/wm/window_util.cc
|
| diff --git a/ash/wm/window_util.cc b/ash/wm/window_util.cc
|
| index 6f591a4b7b2fd0d57560caed993a7e414c8212f7..45a2add17770f24f28d8d0fd4b4a3708cda497e2 100644
|
| --- a/ash/wm/window_util.cc
|
| +++ b/ash/wm/window_util.cc
|
| @@ -22,6 +22,8 @@
|
| #include "ui/gfx/rect.h"
|
| #include "ui/gfx/screen.h"
|
| #include "ui/views/corewm/window_util.h"
|
| +#include "ui/views/view.h"
|
| +#include "ui/views/widget/widget.h"
|
|
|
| namespace ash {
|
| namespace wm {
|
| @@ -201,5 +203,19 @@ void AdjustBoundsToEnsureWindowVisibility(const gfx::Rect& work_area,
|
| }
|
| }
|
|
|
| +void MoveWindowToEventRoot(aura::Window* window, const ui::Event& event) {
|
| + views::View* target = static_cast<views::View*>(event.target());
|
| + if (!target)
|
| + return;
|
| + aura::RootWindow* target_root =
|
| + target->GetWidget()->GetNativeView()->GetRootWindow();
|
| + if (!target_root || target_root == window->GetRootWindow())
|
| + return;
|
| + aura::Window* window_container =
|
| + ash::Shell::GetContainer(target_root, window->parent()->id());
|
| + // Move the window to the target launcher.
|
| + window_container->AddChild(window);
|
| +}
|
| +
|
| } // namespace wm
|
| } // namespace ash
|
|
|