| Index: ui/wm/core/easy_resize_window_targeter.cc
|
| diff --git a/ui/wm/core/easy_resize_window_targeter.cc b/ui/wm/core/easy_resize_window_targeter.cc
|
| index f3a2b0a77ebcdb09506581d4daa95ca4b2d2c4de..1f0e90a0eb8ea47f2a580ecd46ca03456b11d188 100644
|
| --- a/ui/wm/core/easy_resize_window_targeter.cc
|
| +++ b/ui/wm/core/easy_resize_window_targeter.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "ui/wm/public/easy_resize_window_targeter.h"
|
|
|
| +#include "ui/aura/client/transient_window_client.h"
|
| #include "ui/aura/window.h"
|
| #include "ui/gfx/geometry/insets_f.h"
|
| #include "ui/gfx/geometry/rect.h"
|
| @@ -25,10 +26,7 @@ EasyResizeWindowTargeter::~EasyResizeWindowTargeter() {
|
| bool EasyResizeWindowTargeter::EventLocationInsideBounds(
|
| aura::Window* window,
|
| const ui::LocatedEvent& event) const {
|
| - // Use the extended bounds only for immediate child windows of |container_|.
|
| - // Use the default targetter otherwise.
|
| - if (window->parent() == container_ && (!window->transient_parent() ||
|
| - window->transient_parent() == container_)) {
|
| + if (ShouldUseExtendedBounds(window)) {
|
| gfx::RectF bounds(window->bounds());
|
| gfx::Transform transform = window->layer()->transform();
|
| transform.TransformRect(&bounds);
|
| @@ -45,4 +43,18 @@ bool EasyResizeWindowTargeter::EventLocationInsideBounds(
|
| return WindowTargeter::EventLocationInsideBounds(window, event);
|
| }
|
|
|
| +bool EasyResizeWindowTargeter::ShouldUseExtendedBounds(
|
| + const aura::Window* window) const {
|
| + // Use the extended bounds only for immediate child windows of |container_|.
|
| + // Use the default targetter otherwise.
|
| + if (window->parent() != container_)
|
| + return false;
|
| +
|
| + aura::client::TransientWindowClient* transient_window_client =
|
| + aura::client::GetTransientWindowClient();
|
| + return !transient_window_client ||
|
| + !transient_window_client->GetTransientParent(window) ||
|
| + transient_window_client->GetTransientParent(window) == container_;
|
| +}
|
| +
|
| } // namespace wm
|
|
|