Index: views/desktop/desktop_window_root_view.cc |
diff --git a/views/desktop/desktop_window_root_view.cc b/views/desktop/desktop_window_root_view.cc |
index f8311ae3d6b945e3aa4335e19f7e0bdbfc6c5ba5..4f1d5ca0c74bb2431dc5db8bf2e1fd9f81f646d5 100644 |
--- a/views/desktop/desktop_window_root_view.cc |
+++ b/views/desktop/desktop_window_root_view.cc |
@@ -28,7 +28,20 @@ DesktopWindowRootView::~DesktopWindowRootView() { |
// DesktopWindowRootView, internal::RootView overrides: |
bool DesktopWindowRootView::OnMousePressed(const MouseEvent& event) { |
- View* target = GetEventHandlerForPoint(event.location()); |
+ ActivateWidgetAtLocation(event.location()); |
+ return RootView::OnMousePressed(event); |
+} |
+ |
+ui::TouchStatus DesktopWindowRootView::OnTouchEvent(const TouchEvent& event) { |
+ ActivateWidgetAtLocation(event.location()); |
+ return RootView::OnTouchEvent(event); |
+} |
+ |
+//////////////////////////////////////////////////////////////////////////////// |
+// DesktopWindowRootView, private |
+ |
+void DesktopWindowRootView::ActivateWidgetAtLocation(const gfx::Point& point) { |
+ View* target = GetEventHandlerForPoint(point); |
if (target->GetClassName() == internal::NativeWidgetView::kViewClassName) { |
internal::NativeWidgetView* native_widget_view = |
static_cast<internal::NativeWidgetView*>(target); |
@@ -37,7 +50,6 @@ bool DesktopWindowRootView::OnMousePressed(const MouseEvent& event) { |
} else { |
desktop_window_view_->ActivateWidget(NULL); |
} |
- return RootView::OnMousePressed(event); |
} |
} // namespace desktop |