[mutter/wip/rstrode/rhel-8.0.0: 110/117] backends/x11: Add a synaptics check for two finger scroll availability



commit 325d3ebb2a044a4417e5ca860048e6104afc9f5a
Author: Rui Matos <tiagomatos gmail com>
Date:   Mon Oct 9 18:39:52 2017 +0200

    backends/x11: Add a synaptics check for two finger scroll availability
    
    Commit "backends/x11: Support synaptics configuration" added support
    for synaptics two finger scrolling but didn't add the code to check
    that it is available resulting in the upper layer always assuming it
    isn't.

 src/backends/x11/meta-input-settings-x11.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
---
diff --git a/src/backends/x11/meta-input-settings-x11.c b/src/backends/x11/meta-input-settings-x11.c
index 1d84dfccf..5a82edbe6 100644
--- a/src/backends/x11/meta-input-settings-x11.c
+++ b/src/backends/x11/meta-input-settings-x11.c
@@ -625,6 +625,17 @@ meta_input_settings_x11_has_two_finger_scroll (MetaInputSettings  *settings,
   guchar *available = NULL;
   gboolean has_two_finger = TRUE;
 
+  if (is_device_synaptics (device))
+    {
+      available = get_property (device, "Synaptics Capabilities",
+                                XA_INTEGER, 8, 4);
+      if (!available || !available[3])
+          has_two_finger = FALSE;
+
+      meta_XFree (available);
+      return has_two_finger;
+    }
+
   available = get_property (device, "libinput Scroll Methods Available",
                             XA_INTEGER, 8, SCROLL_METHOD_NUM_FIELDS);
   if (!available || !available[SCROLL_METHOD_FIELD_2FG])


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