(This was reverted because this causes Chrome to consider Magic Mouse as
a touchpad. But once we switch mice to gestures library, I think it
should be fine to merge this change.)
The driver emits multi-touch events for Magic Trackpad as well as Magic
Mouse, but it does not set keybits that are related to multi-touch event
for Magic Mouse; so set these keybits.
The keybits that are not set cause trouble because user programs often
probe these keybits for self-configuration and thus they cannot operate
properly if the keybits are not set.
One of such troubles is that libevdev will not be able to emit correct
touch count, causing gestures library failed to do fling stop.
Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
BUG=chromium-os:36322
TEST=On Snow, connect Magic Mouse and touch it; evtest should show
BTN_TOUCH and BTN_TOOL_FINGER.
Event: time
1363905613.064416, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
Event: time
1363905613.064421, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time
1363905613.064423, type 1 (EV_KEY), code 325 (BTN_TOOL_FINGER), value 0
Then test scroll and fling stop; it should work now.
Finally, check /var/log/Xorg.0.log and does not see error
message of "Too many fingers! Max is 1, but I got 2"
Original-Change-Id: Ie7fd4327935555f41577e2c8c6d6d78b52934f1a
Reviewed-on: https://gerrit.chromium.org/gerrit/41322
Commit-Queue: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
(cherry picked from commit
5c1386506de5237373db16f470d54e8a83afe318)
Change-Id: I6702dbf400aa28296308a467d065fd5a326ac30a
Reviewed-on: https://gerrit.chromium.org/gerrit/46169
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Commit-Queue: Che-Liang Chiou <clchiou@chromium.org>