Index: ui/views/window/non_client_view.cc |
diff --git a/ui/views/window/non_client_view.cc b/ui/views/window/non_client_view.cc |
index 68a804056eff599142ae7ad09d0c7bfe358fb5a6..1d82fb225bf1a8a86f58b81f11caa46f8420b270 100644 |
--- a/ui/views/window/non_client_view.cc |
+++ b/ui/views/window/non_client_view.cc |
@@ -178,7 +178,7 @@ views::View* NonClientView::GetEventHandlerForPoint(const gfx::Point& point) { |
// removed from the NonClientView. |
gfx::Point point_in_child_coords(point); |
View::ConvertPointToView(this, frame_view_.get(), &point_in_child_coords); |
- if (frame_view_->HitTest(point_in_child_coords)) |
+ if (frame_view_->HitTest(gfx::Rect(point_in_child_coords, gfx::Size(0, 0)))) |
return frame_view_->GetEventHandlerForPoint(point_in_child_coords); |
} |
@@ -247,10 +247,14 @@ int NonClientFrameView::GetHTComponentForFrame(const gfx::Point& point, |
//////////////////////////////////////////////////////////////////////////////// |
// NonClientFrameView, View overrides: |
-bool NonClientFrameView::HitTest(const gfx::Point& l) const { |
+bool NonClientFrameView::HitTest(const gfx::Rect& r) const { |
// For the default case, we assume the non-client frame view never overlaps |
// the client view. |
- return !GetWidget()->client_view()->bounds().Contains(l); |
+ if (r.IsEmpty()) |
+ return !GetWidget()->client_view()->bounds().Contains(gfx::Point(r.x(), |
sky
2012/08/07 20:11:43
r.origin()
tdanderson
2012/08/08 23:47:51
Done.
|
+ r.y())); |
+ return !GetWidget()->client_view()->bounds().Intersects(r); |
+ |
} |
//////////////////////////////////////////////////////////////////////////////// |