diff options
author | Andreas Pokorny <andreas.pokorny@gmail.com> | 2016-07-14 22:42:10 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-07-14 22:42:10 +0200 |
commit | d3a37494e6e8ee9de7f4a018076d28bdf0e665ac (patch) | |
tree | 0320ab9797f284c101de72cdf61a18617edef5e1 /src/udev/udev-builtin-input_id.c | |
parent | hwdb: add axis corrections for the Lenovo V360 touchpad (#3712) (diff) | |
download | systemd-d3a37494e6e8ee9de7f4a018076d28bdf0e665ac.tar.xz systemd-d3a37494e6e8ee9de7f4a018076d28bdf0e665ac.zip |
Fix tablet detection, by replicating decision tree of non-multi-touch axes (#3724)
Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
Diffstat (limited to 'src/udev/udev-builtin-input_id.c')
-rw-r--r-- | src/udev/udev-builtin-input_id.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/udev/udev-builtin-input_id.c b/src/udev/udev-builtin-input_id.c index 51a55cdbc4..59b9804dc4 100644 --- a/src/udev/udev-builtin-input_id.c +++ b/src/udev/udev-builtin-input_id.c @@ -210,8 +210,14 @@ static bool test_pointers(struct udev_device *dev, else if (has_joystick_axes_or_buttons) is_joystick = true; } - if (has_mt_coordinates && (is_direct || has_touch)) - is_touchscreen = true; + if (has_mt_coordinates) { + if (stylus_or_pen) + is_tablet = true; + else if (finger_but_no_pen && !is_direct) + is_touchpad = true; + else if (has_touch || is_direct) + is_touchscreen = true; + } if (has_rel_coordinates && has_mouse_button) is_mouse = true; |