Index: ui/aura/root_window_host_linux.cc |
diff --git a/ui/aura/root_window_host_linux.cc b/ui/aura/root_window_host_linux.cc |
index 54e750555badb91610a1d5d67e44ba73d83a42aa..2afe0912d777ee74a60e65fa58e236ab38619d6e 100644 |
--- a/ui/aura/root_window_host_linux.cc |
+++ b/ui/aura/root_window_host_linux.cc |
@@ -357,9 +357,8 @@ RootWindowHostLinux::~RootWindowHostLinux() { |
XFreeCursor(xdisplay_, invisible_cursor_); |
} |
-base::MessagePumpDispatcher::DispatchStatus RootWindowHostLinux::Dispatch( |
- XEvent* xev) { |
- bool handled = false; |
+bool RootWindowHostLinux::Dispatch(const base::NativeEvent& event) { |
+ XEvent* xev = event; |
// See crbug.com/109884. |
// CheckXEventForConsistency(xev); |
@@ -367,22 +366,21 @@ base::MessagePumpDispatcher::DispatchStatus RootWindowHostLinux::Dispatch( |
switch (xev->type) { |
case Expose: |
root_window_->ScheduleFullDraw(); |
- handled = true; |
break; |
case KeyPress: { |
KeyEvent keydown_event(xev, false); |
- handled = root_window_->DispatchKeyEvent(&keydown_event); |
+ root_window_->DispatchKeyEvent(&keydown_event); |
break; |
} |
case KeyRelease: { |
KeyEvent keyup_event(xev, false); |
- handled = root_window_->DispatchKeyEvent(&keyup_event); |
+ root_window_->DispatchKeyEvent(&keyup_event); |
break; |
} |
case ButtonPress: |
case ButtonRelease: { |
MouseEvent mouseev(xev); |
- handled = root_window_->DispatchMouseEvent(&mouseev); |
+ root_window_->DispatchMouseEvent(&mouseev); |
break; |
} |
case FocusOut: |
@@ -409,7 +407,6 @@ base::MessagePumpDispatcher::DispatchStatus RootWindowHostLinux::Dispatch( |
bounds_ = bounds; |
if (size_changed) |
root_window_->OnHostResized(bounds.size()); |
- handled = true; |
break; |
} |
case GenericEvent: { |
@@ -428,7 +425,7 @@ base::MessagePumpDispatcher::DispatchStatus RootWindowHostLinux::Dispatch( |
case ui::ET_TOUCH_RELEASED: |
case ui::ET_TOUCH_MOVED: { |
TouchEvent touchev(xev); |
- handled = root_window_->DispatchTouchEvent(&touchev); |
+ root_window_->DispatchTouchEvent(&touchev); |
break; |
} |
case ui::ET_MOUSE_MOVED: |
@@ -445,18 +442,17 @@ base::MessagePumpDispatcher::DispatchStatus RootWindowHostLinux::Dispatch( |
case ui::ET_MOUSE_ENTERED: |
case ui::ET_MOUSE_EXITED: { |
MouseEvent mouseev(xev); |
- handled = root_window_->DispatchMouseEvent(&mouseev); |
+ root_window_->DispatchMouseEvent(&mouseev); |
break; |
} |
case ui::ET_SCROLL_FLING_START: |
case ui::ET_SCROLL_FLING_CANCEL: |
case ui::ET_SCROLL: { |
ScrollEvent scrollev(xev); |
- handled = root_window_->DispatchScrollEvent(&scrollev); |
+ root_window_->DispatchScrollEvent(&scrollev); |
break; |
} |
case ui::ET_UNKNOWN: |
- handled = false; |
break; |
default: |
NOTREACHED(); |
@@ -472,7 +468,6 @@ base::MessagePumpDispatcher::DispatchStatus RootWindowHostLinux::Dispatch( |
// focus to our host window. |
if (!IsWindowManagerPresent() && focus_when_shown_) |
XSetInputFocus(xdisplay_, xwindow_, RevertToNone, CurrentTime); |
- handled = true; |
break; |
} |
case ClientMessage: { |
@@ -480,7 +475,6 @@ base::MessagePumpDispatcher::DispatchStatus RootWindowHostLinux::Dispatch( |
if (message_type == wm_delete_window_atom_) { |
// We have received a close message from the window manager. |
root_window_->OnRootWindowHostClosed(); |
- handled = true; |
} |
break; |
} |
@@ -519,12 +513,11 @@ base::MessagePumpDispatcher::DispatchStatus RootWindowHostLinux::Dispatch( |
} |
MouseEvent mouseev(xev); |
- handled = root_window_->DispatchMouseEvent(&mouseev); |
+ root_window_->DispatchMouseEvent(&mouseev); |
break; |
} |
} |
- return handled ? base::MessagePumpDispatcher::EVENT_PROCESSED : |
- base::MessagePumpDispatcher::EVENT_IGNORED; |
+ return true; |
} |
void RootWindowHostLinux::SetRootWindow(RootWindow* root_window) { |