提交 ad6d4267 编写于 作者: B Benjamin Tissoires 提交者: Jiri Kosina

HID: hid-mosart: ignore buttons report

This commit allows the device to be recognized as a touchscreen, and not a
touchpad by xf86-input-evdev.

The device has 2 modes. The first one is an emulation of a touchscreen by
sending left and right button, and the second mode is the one used in
dual-touch (sending trackingID, touch and else).

That's why there is a hid report containing left and right buttons
(9000001 and 9000002). The point is that xorg relies on these fields to
determine if it's a touchpad or a touchscreen.
Clearing the report (return -1) makes xorg detecting it out of the box
as a quite pleasant (dual)touchscreen.
Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@enac.fr>
Acked-by: NChase Douglas <chase.douglas@canonical.com>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 6a66bbd6
......@@ -90,6 +90,10 @@ static int mosart_input_mapping(struct hid_device *hdev, struct hid_input *hi,
case 0xff000000:
/* ignore HID features */
return -1;
case HID_UP_BUTTON:
/* ignore buttons */
return -1;
}
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册