Index: ui/aura/dispatcher_linux.cc |
diff --git a/ui/aura/dispatcher_linux.cc b/ui/aura/dispatcher_linux.cc |
index e6e70d0d4f091bb26f13cb8ea7cd1aa892f211b6..87810c50cb87eef991884d53a3db00e6b5bd85a8 100644 |
--- a/ui/aura/dispatcher_linux.cc |
+++ b/ui/aura/dispatcher_linux.cc |
@@ -39,9 +39,11 @@ namespace aura { |
DispatcherLinux::DispatcherLinux() { |
base::MessagePumpX::SetDefaultDispatcher(this); |
+ MessageLoopForUI::current()->AddObserver(this); |
} |
DispatcherLinux::~DispatcherLinux() { |
+ MessageLoopForUI::current()->RemoveObserver(this); |
base::MessagePumpX::SetDefaultDispatcher(NULL); |
} |
@@ -56,8 +58,6 @@ void DispatcherLinux::WindowDispatcherDestroying(::Window window) { |
} |
bool DispatcherLinux::Dispatch(const base::NativeEvent& xev) { |
- PreprocessXEvent(xev); |
- |
// XI_HierarchyChanged events are special. There is no window associated with |
// these events. So process them directly from here. |
if (xev->type == GenericEvent && |
@@ -81,6 +81,15 @@ bool DispatcherLinux::Dispatch(const base::NativeEvent& xev) { |
return dispatcher ? dispatcher->Dispatch(xev) : true; |
} |
+base::EventStatus DispatcherLinux::WillProcessEvent( |
+ const base::NativeEvent& event) { |
+ PreprocessXEvent(event); |
+ return base::EVENT_CONTINUE; |
+} |
+ |
+void DispatcherLinux::DidProcessEvent(const base::NativeEvent& event) { |
+} |
+ |
MessageLoop::Dispatcher* DispatcherLinux::GetDispatcherForXEvent( |
XEvent* xev) const { |
::Window window = xev->xany.window; |