Index: ui/wm/core/easy_resize_window_targeter.cc |
=================================================================== |
--- ui/wm/core/easy_resize_window_targeter.cc (revision 253296) |
+++ ui/wm/core/easy_resize_window_targeter.cc (working copy) |
@@ -27,18 +27,19 @@ |
aura::Window* window, |
const ui::LocatedEvent& event) const { |
if (ShouldUseExtendedBounds(window)) { |
- gfx::RectF bounds(window->bounds()); |
- gfx::Transform transform = window->layer()->transform(); |
- transform.TransformRect(&bounds); |
- if (event.IsTouchEvent() || event.IsGestureEvent()) { |
+ // Note that |event|'s location is in |window|'s parent's coordinate system, |
+ // so convert it to |window|'s coordinate system first. |
+ gfx::Point point = event.location(); |
+ if (window->parent()) |
+ aura::Window::ConvertPointToTarget(window->parent(), window, &point); |
+ |
+ gfx::Rect bounds(window->bounds().size()); |
+ if (event.IsTouchEvent() || event.IsGestureEvent()) |
bounds.Inset(touch_extend_); |
- } else { |
+ else |
bounds.Inset(mouse_extend_); |
- } |
- // Note that |event|'s location is in the |container_|'s coordinate system, |
- // as is |bounds|. |
- return bounds.Contains(event.location()); |
+ return bounds.Contains(point); |
} |
return WindowTargeter::EventLocationInsideBounds(window, event); |
} |