Index: ash/wm/workspace/multi_window_resize_controller.cc |
diff --git a/ash/wm/workspace/multi_window_resize_controller.cc b/ash/wm/workspace/multi_window_resize_controller.cc |
index db261b7ade50d37b5bb10e03b447535750f39b7f..1b8b2cf711c12d0f69ece9334b54582041ccf989 100644 |
--- a/ash/wm/workspace/multi_window_resize_controller.cc |
+++ b/ash/wm/workspace/multi_window_resize_controller.cc |
@@ -130,7 +130,9 @@ class MultiWindowResizeController::ResizeMouseWatcherHost : |
// MouseWatcherHost overrides: |
bool Contains(const gfx::Point& point_in_screen, |
MouseEventType type) override { |
- return host_->IsOverWindows(point_in_screen); |
+ return (type == MOUSE_PRESS) |
+ ? host_->IsOverResizeWidget(point_in_screen) |
+ : host_->IsOverWindows(point_in_screen); |
} |
private: |
@@ -517,9 +519,15 @@ gfx::Rect MultiWindowResizeController::CalculateResizeWidgetBounds( |
return gfx::Rect(x, y, pref.width(), pref.height()); |
} |
+bool MultiWindowResizeController::IsOverResizeWidget( |
+ const gfx::Point& location_in_screen) const { |
+ return resize_widget_->GetWindowBoundsInScreen().Contains( |
+ location_in_screen); |
+} |
+ |
bool MultiWindowResizeController::IsOverWindows( |
const gfx::Point& location_in_screen) const { |
- if (resize_widget_->GetWindowBoundsInScreen().Contains(location_in_screen)) |
+ if (IsOverResizeWidget(location_in_screen)) |
return true; |
if (windows_.direction == TOP_BOTTOM) { |