From: Andreas Pokorny Date: Thu, 14 Jul 2016 20:42:10 +0000 (+0200) Subject: Fix tablet detection, by replicating decision tree of non-multi-touch axes (#3724) X-Git-Tag: v231~66 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d3a37494e6e8ee9de7f4a018076d28bdf0e665ac;p=thirdparty%2Fsystemd.git Fix tablet detection, by replicating decision tree of non-multi-touch axes (#3724) Signed-off-by: Andreas Pokorny --- diff --git a/src/udev/udev-builtin-input_id.c b/src/udev/udev-builtin-input_id.c index 51a55cdbc4b..59b9804dc4b 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;