| Index: views/focus/accelerator_handler_touch.cc
|
| diff --git a/views/focus/accelerator_handler_touch.cc b/views/focus/accelerator_handler_touch.cc
|
| index b24d8f09c33022f22096fe06d0344fa35107ce3c..af980b2e60e18953e30f5f8a44854ff0b75b3d82 100644
|
| --- a/views/focus/accelerator_handler_touch.cc
|
| +++ b/views/focus/accelerator_handler_touch.cc
|
| @@ -62,18 +62,30 @@ bool X2EventIsTouchEvent(XEvent* xev) {
|
|
|
| #if defined(HAVE_XINPUT2)
|
| bool DispatchX2Event(RootView* root, XEvent* xev) {
|
| + XGenericEventCookie* cookie = &xev->xcookie;
|
| +
|
| if (X2EventIsTouchEvent(xev)) {
|
| + // Hide the cursor when a touch event comes in.
|
| + TouchFactory::GetInstance()->SetCursorVisibility(false);
|
| +
|
| // Create a TouchEvent, and send it off to |root|. If the event
|
| // is processed by |root|, then return. Otherwise let it fall through so it
|
| // can be used (if desired) as a mouse event.
|
| -
|
| TouchEvent touch(xev);
|
| if (root->OnTouchEvent(touch) != views::View::TOUCH_STATUS_UNKNOWN)
|
| return true;
|
| + } else {
|
| + // Make sure the cursor is visible when there is an event from a non-touch
|
| + // pointer device.
|
| + switch (cookie->evtype) {
|
| + case XI_ButtonPress:
|
| + case XI_ButtonRelease:
|
| + case XI_Motion:
|
| + TouchFactory::GetInstance()->SetCursorVisibility(true);
|
| + break;
|
| + }
|
| }
|
|
|
| - XGenericEventCookie* cookie = &xev->xcookie;
|
| -
|
| switch (cookie->evtype) {
|
| case XI_KeyPress:
|
| case XI_KeyRelease: {
|
|
|