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 43b2e70052b6b6616f68ac3fe8d989ceea775494..e076116c274c04668141842b28a8324681d65d10 100644 |
--- a/ui/views/window/non_client_view.cc |
+++ b/ui/views/window/non_client_view.cc |
@@ -36,6 +36,8 @@ static const int kClientViewIndex = 1; |
NonClientView::NonClientView() |
: client_view_(NULL), |
overlay_view_(NULL) { |
+ SetEventTargeter( |
+ scoped_ptr<views::ViewTargeter>(new views::ViewTargeter(this))); |
} |
NonClientView::~NonClientView() { |
@@ -187,9 +189,13 @@ const char* NonClientView::GetClassName() const { |
return kViewClassName; |
} |
-View* NonClientView::GetEventHandlerForRect(const gfx::Rect& rect) { |
+// Terry - move to right place in file |
+View* NonClientView::TargetForRect(View* root, |
+ const gfx::Rect& rect) { |
+ CHECK_EQ(root, this); |
+ |
if (!UsePointBasedTargeting(rect)) |
- return View::GetEventHandlerForRect(rect); |
+ return ViewTargeterDelegate::TargetForRect(root, rect); |
// Because of the z-ordering of our child views (the client view is positioned |
// over the non-client frame view, if the client view ever overlaps the frame |
@@ -210,7 +216,7 @@ View* NonClientView::GetEventHandlerForRect(const gfx::Rect& rect) { |
return frame_view_->GetEventHandlerForRect(rect_in_child_coords); |
} |
- return View::GetEventHandlerForRect(rect); |
+ return ViewTargeterDelegate::TargetForRect(root, rect); |
} |
View* NonClientView::GetTooltipHandlerForPoint(const gfx::Point& point) { |