Index: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc |
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc |
index 12aec9272d816cc17b93a1f47efd2fb6707d0376..914c1d24a83c462a87c35a24314b3c2cb8a4f00d 100644 |
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc |
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc |
@@ -437,9 +437,8 @@ void DesktopNativeWidgetAura::InitNativeWidget( |
// handed way of accomplishing focus. |
// No event filter for aura::Env. Create CompoundEvnetFilter per |
// WindowEventDispatcher. |
- root_window_event_filter_ = new wm::CompoundEventFilter; |
- // Pass ownership of the filter to the root_window. |
- host_->window()->SetEventFilter(root_window_event_filter_); |
+ root_window_event_filter_.reset(new wm::CompoundEventFilter); |
+ host_->window()->AddPreTargetHandler(root_window_event_filter_.get()); |
// The host's dispatcher must be added to |native_cursor_manager_| before |
// OnNativeWidgetCreated() is called. |