| Index: views/focus/accelerator_handler_touch.cc
|
| diff --git a/views/focus/accelerator_handler_touch.cc b/views/focus/accelerator_handler_touch.cc
|
| index a07b977de3b9011aec23f09d2cc032868cd97476..b3f94d7f8e99a56dbfd4af497472bdc756d6da12 100644
|
| --- a/views/focus/accelerator_handler_touch.cc
|
| +++ b/views/focus/accelerator_handler_touch.cc
|
| @@ -101,14 +101,9 @@ bool DispatchXEvent(XEvent* xev) {
|
|
|
| #if defined(HAVE_XINPUT2)
|
| if (xev->type == GenericEvent) {
|
| - if (XGetEventData(xev->xgeneric.display, &xev->xcookie)) {
|
| - XGenericEventCookie* cookie = &xev->xcookie;
|
| - XIDeviceEvent* xiev = static_cast<XIDeviceEvent*>(cookie->data);
|
| - xwindow = xiev->event;
|
| - } else {
|
| - DLOG(WARNING) << "Error fetching XGenericEventCookie for event.";
|
| - return false;
|
| - }
|
| + XGenericEventCookie* cookie = &xev->xcookie;
|
| + XIDeviceEvent* xiev = static_cast<XIDeviceEvent*>(cookie->data);
|
| + xwindow = xiev->event;
|
| }
|
| #endif
|
|
|
| @@ -154,9 +149,7 @@ bool DispatchXEvent(XEvent* xev) {
|
|
|
| #if defined(HAVE_XINPUT2)
|
| case GenericEvent: {
|
| - bool ret = DispatchX2Event(root, xev);
|
| - XFreeEventData(xev->xgeneric.display, &xev->xcookie);
|
| - return ret;
|
| + return DispatchX2Event(root, xev);
|
| }
|
| #endif
|
| }
|
| @@ -172,8 +165,11 @@ bool AcceleratorHandler::Dispatch(GdkEvent* event) {
|
| return true;
|
| }
|
|
|
| -bool AcceleratorHandler::Dispatch(XEvent* xev) {
|
| - return DispatchXEvent(xev);
|
| +base::MessagePumpGlibXDispatcher::DispatchStatus AcceleratorHandler::Dispatch(
|
| + XEvent* xev) {
|
| + return DispatchXEvent(xev) ?
|
| + base::MessagePumpGlibXDispatcher::EVENT_PROCESSED :
|
| + base::MessagePumpGlibXDispatcher::EVENT_IGNORED;
|
| }
|
|
|
| } // namespace views
|
|
|