x11: Do not misdetect mice with abs axes as touchscreens

VMWare seems to create mouse devices with abs axes which confuses
our detection of single-touch touchscreens. Those have though a
name we can match on ("VirtualPS/2 VMware VMMouse"), it should
be pretty safe to assume that no real touchscreens have "mouse"
in their name...

https://bugzilla.gnome.org/show_bug.cgi?id=757358
This commit is contained in:
Carlos Garnacho 2015-11-13 17:14:34 +01:00 committed by Matthias Clasen
parent bc6d2d65fb
commit b32c7c3282

View File

@ -426,7 +426,8 @@ create_device (GdkDeviceManager *device_manager,
else if (strstr (tmp_name, "wacom") ||
strstr (tmp_name, "pen"))
input_source = GDK_SOURCE_PEN;
else if (has_abs_axes (display, dev->classes, dev->num_classes))
else if (!strstr (tmp_name, "mouse") &&
has_abs_axes (display, dev->classes, dev->num_classes))
input_source = GDK_SOURCE_TOUCHSCREEN;
else
input_source = GDK_SOURCE_MOUSE;