summaryrefslogtreecommitdiffstats
path: root/views/focus/accelerator_handler_touch.cc
diff options
context:
space:
mode:
authorsadrul@google.com <sadrul@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-08 02:39:02 +0000
committersadrul@google.com <sadrul@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-08 02:39:02 +0000
commit922ed27ba30b69a5e83e8719145997af5953697e (patch)
tree755c2710ff2c21a12a958e3ac37690c5bbc7d2be /views/focus/accelerator_handler_touch.cc
parent1e46a12cf34dbf71d6a07bc3f7bab666b01565a7 (diff)
downloadchromium_src-922ed27ba30b69a5e83e8719145997af5953697e.zip
chromium_src-922ed27ba30b69a5e83e8719145997af5953697e.tar.gz
chromium_src-922ed27ba30b69a5e83e8719145997af5953697e.tar.bz2
touch: Fix wheel scrolling for xinput2.
BUG=wheel scrolling doesn't work TEST=wheel scrolling scrolls the page when possible Review URL: http://codereview.chromium.org/6250195 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74076 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/focus/accelerator_handler_touch.cc')
-rw-r--r--views/focus/accelerator_handler_touch.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/views/focus/accelerator_handler_touch.cc b/views/focus/accelerator_handler_touch.cc
index 4532034f..9847beb 100644
--- a/views/focus/accelerator_handler_touch.cc
+++ b/views/focus/accelerator_handler_touch.cc
@@ -87,6 +87,14 @@ bool DispatchX2Event(RootView* root, XEvent* xev) {
case XI_ButtonPress:
case XI_ButtonRelease:
case XI_Motion: {
+ // 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.
+ XIDeviceEvent* xievent = static_cast<XIDeviceEvent*>(cookie->data);
+ if (xievent->detail == 4 || xievent->detail == 5) {
+ MouseWheelEvent wheelev(xev);
+ return root->ProcessMouseWheelEvent(wheelev);
+ }
+
MouseEvent mouseev(xev);
if (!touch_event) {
// Show the cursor, and decide whether or not the cursor should be