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

xserver-xorg-input-synaptics: Changes to 'upstream-unstable'



 conf/50-synaptics.conf |    2 +-
 configure.ac           |    9 ++++++++-
 src/eventcomm.c        |   48 +++++++++++++++++++++++++++++-------------------
 src/synaptics.c        |    5 +++--
 4 files changed, 41 insertions(+), 23 deletions(-)

New commits:
commit 7d0ff39519e4d3760722b914883bee276035061c
Author: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Date:   Sun Jul 27 12:58:18 2014 +0200

    Prevent two-finger taps from being ignored
    
    When two fingers are used, the coordinates of only one of them is taken into
    account. This can lead to sudden variations of the absolute coordinates when
    two-fingers taps are performed if the finger considered changes.
    
    Take into account coordinates variations to prevent unwanted taps only if
    the number of fingers doesn't change.
    
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/synaptics.c b/src/synaptics.c
index b25c902..b49957c 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -1960,8 +1960,9 @@ HandleTapProcessing(SynapticsPrivate * priv, struct SynapticsHwState *hw,
             (priv->tap_max_fingers <=
              ((priv->horiz_scroll_twofinger_on ||
                priv->vert_scroll_twofinger_on) ? 2 : 1)) &&
-            ((abs(hw->x - priv->touch_on.x) >= para->tap_move) ||
-             (abs(hw->y - priv->touch_on.y) >= para->tap_move)));
+            (priv->prevFingers == hw->numFingers &&
+             ((abs(hw->x - priv->touch_on.x) >= para->tap_move) ||
+              (abs(hw->y - priv->touch_on.y) >= para->tap_move))));
     press = (hw->left || hw->right || hw->middle);
 
     if (touch) {

commit a36edf8307ab9b5bffca103dd875623a66012c0b
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu May 15 08:34:55 2014 +1000

    Use libevdev's per-device logging functions instead of the global handler
    
    Per-device logging functions don't interfere with other drivers if they also
    use libevdev, so use those instead the global log handler if available. If not
    available, drop libevdev logging, I don't want to maintain the ifdef mess and
    the logging doesn't give us _that_ much benefit.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/configure.ac b/configure.ac
index 4b3a726..0a2bfb6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -117,6 +117,13 @@ esac
 if test "x$BUILD_EVENTCOMM" = xyes; then
     AC_DEFINE(BUILD_EVENTCOMM, 1, [Optional backend eventcomm enabled])
     PKG_CHECK_MODULES(LIBEVDEV, [libevdev >= 0.4])
+    SAVE_LIBS="$LIBS"
+    LIBS="$LIBEVDEV_LIBS"
+    AC_CHECK_LIB(evdev, libevdev_set_device_log_function,
+                      [AC_DEFINE(HAVE_LIBEVDEV_DEVICE_LOG_FUNCS, 1,
+                       [libevdev supports per-device log functions])],
+                       [])
+    LIBS="$SAVE_LIBS"
 fi
 if test "x$BUILD_PSMCOMM" = xyes; then
     AC_DEFINE(BUILD_PSMCOMM, 1, [Optional backend psmcomm enabled])
diff --git a/src/eventcomm.c b/src/eventcomm.c
index 2ee072b..1f440b8 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -90,15 +90,18 @@ struct eventcomm_proto_data {
     enum libevdev_read_flag read_flag;
 };
 
+#ifdef HAVE_LIBEVDEV_DEVICE_LOG_FUNCS
 static void
-libevdev_log_func(enum libevdev_log_priority priority,
+libevdev_log_func(const struct libevdev *dev,
+                  enum libevdev_log_priority priority,
                   void *data,
                   const char *file, int line, const char *func,
                   const char *format, va_list args)
-_X_ATTRIBUTE_PRINTF(6, 0);
+_X_ATTRIBUTE_PRINTF(7, 0);
 
 static void
-libevdev_log_func(enum libevdev_log_priority priority,
+libevdev_log_func(const struct libevdev *dev,
+                  enum libevdev_log_priority priority,
                   void *data,
                   const char *file, int line, const char *func,
                   const char *format, va_list args)
@@ -113,14 +116,7 @@ libevdev_log_func(enum libevdev_log_priority priority,
 
     LogVMessageVerbSigSafe(X_NOTICE, verbosity, format, args);
 }
-
-static void
-set_libevdev_log_handler(void)
-{
-                              /* be quiet, gcc *handwave* */
-    libevdev_set_log_function((libevdev_log_func_t)libevdev_log_func, NULL);
-    libevdev_set_log_priority(LIBEVDEV_LOG_DEBUG);
-}
+#endif
 
 struct eventcomm_proto_data *
 EventProtoDataAlloc(int fd)
@@ -128,7 +124,6 @@ EventProtoDataAlloc(int fd)
     struct eventcomm_proto_data *proto_data;
     int rc;
 
-    set_libevdev_log_handler();
 
     proto_data = calloc(1, sizeof(struct eventcomm_proto_data));
     if (!proto_data)
@@ -137,12 +132,31 @@ EventProtoDataAlloc(int fd)
     proto_data->st_to_mt_scale[0] = 1;
     proto_data->st_to_mt_scale[1] = 1;
 
-    rc = libevdev_new_from_fd(fd, &proto_data->evdev);
+    proto_data->evdev = libevdev_new();
+    if (!proto_data->evdev) {
+        rc = -1;
+        goto out;
+    }
+
+#ifdef HAVE_LIBEVDEV_DEVICE_LOG_FUNCS
+    libevdev_set_device_log_function(proto_data->evdev, libevdev_log_func,
+                                     LIBEVDEV_LOG_DEBUG, NULL);
+#endif
+
+    rc = libevdev_set_fd(proto_data->evdev, fd);
     if (rc < 0) {
+        goto out;
+    }
+
+    proto_data->read_flag = LIBEVDEV_READ_FLAG_NORMAL;
+
+out:
+    if (rc < 0) {
+        if (proto_data && proto_data->evdev)
+            libevdev_free(proto_data->evdev);
         free(proto_data);
         proto_data = NULL;
-    } else
-        proto_data->read_flag = LIBEVDEV_READ_FLAG_NORMAL;
+    }
 
     return proto_data;
 }
@@ -218,8 +232,6 @@ EventDeviceOnHook(InputInfoPtr pInfo, SynapticsParameters * para)
     struct eventcomm_proto_data *proto_data =
         (struct eventcomm_proto_data *) priv->proto_data;
 
-    set_libevdev_log_handler();
-
     if (libevdev_get_fd(proto_data->evdev) != -1) {
         struct input_event ev;
 
@@ -651,8 +663,6 @@ EventReadHwState(InputInfoPtr pInfo,
     struct eventcomm_proto_data *proto_data = priv->proto_data;
     Bool sync_cumulative = FALSE;
 
-    set_libevdev_log_handler();
-
     SynapticsResetTouchHwState(hw, FALSE);
 
     /* Reset cumulative values if buttons were not previously pressed,

commit c1457c0f71e30c194180164320759849fa09bf9b
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu May 29 14:44:43 2014 +1000

    synaptics 1.8.99
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/configure.ac b/configure.ac
index 91b3eda..4b3a726 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-input-synaptics],
-        [1.8.0],
+        [1.8.99],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-input-synaptics])
 AC_CONFIG_SRCDIR([Makefile.am])

commit 730101223432f60397c61f74a5e6789b3ee34ecd
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Aug 6 12:04:14 2014 +1000

    conf: increase top software button area to 15%
    
    We had reports that the top software button area is hard to hit for those
    using the trackpoint and clicking the buttons with their thumb.
    
    Analysis of event recordings (3 different people) for left, right and middle
    clicks shows that there is a significant amount of events up to about 10mm
    (with outliers up to 12mm) from the top of the touchpad. That maps to 15%.
    
    Interestingly, the middle button does not seem to need this, presumably the
    haptic feedback of the little dots sticking out from the surface make hitting
    the button easier. Its size is increased to 15% anyway, for simplicity and
    because a sample set of 3 is too small to be definitive about this.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

diff --git a/conf/50-synaptics.conf b/conf/50-synaptics.conf
index a3145b8..aa50456 100644
--- a/conf/50-synaptics.conf
+++ b/conf/50-synaptics.conf
@@ -33,7 +33,7 @@ Section "InputClass"
         Identifier "Default clickpad buttons"
         MatchDriver "synaptics"
         Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
-        Option "SecondarySoftButtonAreas" "58% 0 0 8% 42% 58% 0 8%"
+        Option "SecondarySoftButtonAreas" "58% 0 0 15% 42% 58% 0 15%"
 EndSection
 
 # This option disables software buttons on Apple touchpads.


Reply to: