[gtk+] x11: Do not misdetect mice with abs axes as touchscreens



commit b32c7c3282cdef795159b0079bb5ebd72d2affbd
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Nov 13 17:14:34 2015 +0100

    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

 gdk/x11/gdkdevicemanager-xi2.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
index dc35f03..4be9bbb 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]