| Index: views/focus/accelerator_handler_touch.cc
|
| diff --git a/views/focus/accelerator_handler_touch.cc b/views/focus/accelerator_handler_touch.cc
|
| index c76e8badbe38773b3d2fd21bf235ddc388c381af..6eb1dd6a62cc6b698c47b6c1e3db4b29f1e135c7 100644
|
| --- a/views/focus/accelerator_handler_touch.cc
|
| +++ b/views/focus/accelerator_handler_touch.cc
|
| @@ -47,31 +47,17 @@ bool DispatchX2Event(Widget* widget, XEvent* xev) {
|
| // TODO(sad): We don't capture XInput2 events from keyboard yet.
|
| break;
|
| }
|
| - case XI_ButtonPress:
|
| - case XI_ButtonRelease:
|
| - case XI_Motion: {
|
| + case XI_TouchBegin:
|
| + case XI_TouchEnd:
|
| + case XI_TouchUpdate: {
|
| XIDeviceEvent* xievent = static_cast<XIDeviceEvent*>(cookie->data);
|
| Event::FromNativeEvent2 from_native;
|
|
|
| - // Scrolling the wheel generates press/release events with button id's 4
|
| - // and 5. In case of a wheelscroll, we do not want to show the cursor.
|
| - if (xievent->detail == 4 || xievent->detail == 5) {
|
| - MouseWheelEvent wheelev(xev, from_native);
|
| - return widget->OnMouseEvent(wheelev);
|
| - }
|
| -
|
| // Is the event coming from a touch device?
|
| if (TouchFactory::GetInstance()->IsTouchDevice(xievent->sourceid)) {
|
| // Hide the cursor when a touch event comes in.
|
| TouchFactory::GetInstance()->SetCursorVisible(false, false);
|
|
|
| - // With XInput 2.0, XI_ButtonPress and XI_ButtonRelease events are
|
| - // ignored, as XI_Motion events contain enough data to detect finger
|
| - // press and release. See more notes in TouchFactory::TouchParam.
|
| - if (cookie->evtype == XI_ButtonPress ||
|
| - cookie->evtype == XI_ButtonRelease)
|
| - return false;
|
| -
|
| // If the TouchEvent is processed by |root|, then return. Otherwise let
|
| // it fall through so it can be used as a MouseEvent, if desired.
|
| TouchEvent touch(xev, from_native);
|
| @@ -83,18 +69,7 @@ bool DispatchX2Event(Widget* widget, XEvent* xev) {
|
| // RootView::OnTouchEvent.
|
| return false;
|
| } else {
|
| - MouseEvent mouseev(xev, from_native);
|
| -
|
| - // Show the cursor. Start a timer to hide the cursor after a delay on
|
| - // move (not drag) events, or if the only button pressed is released.
|
| - bool start_timer = mouseev.type() == ui::ET_MOUSE_MOVED;
|
| - start_timer |= mouseev.type() == ui::ET_MOUSE_RELEASED &&
|
| - (mouseev.IsOnlyLeftMouseButton() ||
|
| - mouseev.IsOnlyMiddleMouseButton() ||
|
| - mouseev.IsOnlyRightMouseButton());
|
| - TouchFactory::GetInstance()->SetCursorVisible(true, start_timer);
|
| -
|
| - return widget->OnMouseEvent(mouseev);
|
| + return false;
|
| }
|
| }
|
| }
|
|
|