[clutter] x11: don't create the libinput tapping property



commit 661078a4f2c7600837fb069b0e83c1b42383eba6
Author: Peter Hutterer <peter hutterer who-t net>
Date:   Thu Jun 25 09:23:13 2015 +1000

    x11: don't create the libinput tapping property
    
    If it doesn't exist, we don't have a touchpad. Don't create the property
    and potentially confuse other pieces of the stack that do the same check.

 clutter/x11/clutter-device-manager-xi2.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/clutter/x11/clutter-device-manager-xi2.c b/clutter/x11/clutter-device-manager-xi2.c
index 1b101c4..7cfcccd 100644
--- a/clutter/x11/clutter-device-manager-xi2.c
+++ b/clutter/x11/clutter-device-manager-xi2.c
@@ -230,11 +230,16 @@ is_touchpad_device (ClutterBackendX11 *backend_x11,
   guint32 *data = NULL;
   int rc, format;
   Atom type;
+  Atom prop;
+
+  prop = XInternAtom (backend_x11->xdpy, "libinput Tapping Enabled", True);
+  if (prop == None)
+    return FALSE;
 
   clutter_x11_trap_x_errors ();
   rc = XIGetProperty (backend_x11->xdpy,
                       info->deviceid,
-                      XInternAtom (backend_x11->xdpy, "libinput Tapping Enabled", False),
+                      prop,
                       0, 1, False, XA_INTEGER, &type, &format, &nitems, &bytes_after,
                       (guchar **) &data);
   clutter_x11_untrap_x_errors ();


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