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

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



 configure.ac       |    2 +-
 src/eventcomm.c    |    1 +
 src/properties.c   |   13 +++++++++++++
 src/synaptics.c    |    9 +++++++++
 src/synapticsstr.h |   10 ++++++++++
 5 files changed, 34 insertions(+), 1 deletion(-)

New commits:
commit 88d926d12a1f5c06ee2825de5bc4b2222ec29c78
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Dec 9 11:28:23 2013 +1000

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

diff --git a/configure.ac b/configure.ac
index 5dfbc4e..a9b8b2b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-input-synaptics],
-        [1.7.1],
+        [1.7.2],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-input-synaptics])
 AC_CONFIG_SRCDIR([Makefile.am])

commit 61243ada3e1e10f6d32a899a6cc595efa244eb25
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Dec 4 07:58:26 2013 +1000

    eventcomm: ungrab the device on DeviceOff
    
    For symmetry, the kernel should ungrab when we close the fd.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    
    [modified for the 1.7 branch which isn't using libevdev yet]
    
    (cherry picked from commit 5d391e352f4e502ada6444a7ce860683e3480fbf)

diff --git a/src/eventcomm.c b/src/eventcomm.c
index 258a538..a9a344b 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -206,6 +206,7 @@ static Bool
 EventDeviceOffHook(InputInfoPtr pInfo)
 {
     UninitializeTouch(pInfo);
+    SYSCALL(ioctl(pInfo->fd, EVIOCGRAB, (pointer) 0));
 
     return Success;
 }

commit 09ac39309fbee01aa047dab1b0f577dc2571cdd1
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Dec 5 09:31:11 2013 +1000

    Add missing property handler for the pressure motion factor
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 29318c1d94510cfb6d5d712e912af111f99edb42)

diff --git a/src/properties.c b/src/properties.c
index dd88fc7..797f1da 100644
--- a/src/properties.c
+++ b/src/properties.c
@@ -650,6 +650,19 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
         para->press_motion_min_z = press[0];
         para->press_motion_max_z = press[1];
     }
+    else if (property == prop_pressuremotion_factor) {
+        float *press;
+
+        if (prop->size != 2 || prop->format != 32 || prop->type != float_type)
+            return BadMatch;
+
+        press = (float *) prop->data;
+        if (press[0] > press[1])
+            return BadValue;
+
+        para->press_motion_min_factor = press[0];
+        para->press_motion_max_factor = press[1];
+    }
     else if (property == prop_grab) {
         if (prop->size != 1 || prop->format != 8 || prop->type != XA_INTEGER)
             return BadMatch;

commit f4ddbde165843924195b08551d7d6d6200c44b23
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Jul 19 11:08:43 2013 +1000

    Disable driver scaling for input ABI 19.2
    
    For absolute devices in relative mode, i.e. touchpads, the server now takes
    device resolution into account. Doing so means that the driver mustn't
    scale, so we deactivate those bits in the driver.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 0fb59b3487d57523a03f078a2061e2ea0cacbc7c)

diff --git a/src/synaptics.c b/src/synaptics.c
index eb38271..e391a98 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -133,9 +133,11 @@ static int DeviceOff(DeviceIntPtr);
 static int DeviceClose(DeviceIntPtr);
 static Bool QueryHardware(InputInfoPtr);
 static void ReadDevDimensions(InputInfoPtr);
+#ifndef NO_DRIVER_SCALING
 static void ScaleCoordinates(SynapticsPrivate * priv,
                              struct SynapticsHwState *hw);
 static void CalculateScalingCoeffs(SynapticsPrivate * priv);
+#endif
 static void SanitizeDimensions(InputInfoPtr pInfo);
 
 void InitDeviceProperties(InputInfoPtr pInfo);
@@ -829,7 +831,10 @@ SynapticsPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
 
     set_default_parameters(pInfo);
 
+#ifndef NO_DRIVER_SCALING
     CalculateScalingCoeffs(priv);
+#endif
+
 
     priv->comm.buffer = XisbNew(pInfo->fd, INPUT_BUFFER_SIZE);
 
@@ -2863,7 +2868,9 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now,
          * calculations that require unadjusted coordinates, for example edge
          * detection.
          */
+#ifndef NO_DRIVER_SCALING
         ScaleCoordinates(priv, hw);
+#endif
     }
 
     dx = dy = 0;
@@ -2987,6 +2994,7 @@ QueryHardware(InputInfoPtr pInfo)
     return TRUE;
 }
 
+#ifndef NO_DRIVER_SCALING
 static void
 ScaleCoordinates(SynapticsPrivate * priv, struct SynapticsHwState *hw)
 {
@@ -3016,3 +3024,4 @@ CalculateScalingCoeffs(SynapticsPrivate * priv)
         priv->vert_coeff = 1;
     }
 }
+#endif
diff --git a/src/synapticsstr.h b/src/synapticsstr.h
index 428befa..a9901a2 100644
--- a/src/synapticsstr.h
+++ b/src/synapticsstr.h
@@ -28,6 +28,14 @@
 #define LogMessageVerbSigSafe xf86MsgVerb
 #endif
 
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 19
+#if GET_ABI_MINOR(ABI_XINPUT_VERSION) >= 2
+/* as of 19.2, the server takes device resolution into account when scaling
+   relative events from abs device, so we must not scale in synaptics. */
+#define NO_DRIVER_SCALING 1
+#endif
+#endif
+
 #ifdef DBG
 #undef DBG
 #endif
@@ -250,8 +258,10 @@ struct _SynapticsPrivateRec {
     int prev_z;                 /* previous z value, for palm detection */
     int prevFingers;            /* previous numFingers, for transition detection */
     int avg_width;              /* weighted average of previous fingerWidth values */
+#ifndef NO_DRIVER_SCALING
     double horiz_coeff;         /* normalization factor for x coordintes */
     double vert_coeff;          /* normalization factor for y coordintes */
+#endif
 
     int minx, maxx, miny, maxy; /* min/max dimensions as detected */
     int minp, maxp, minw, maxw; /* min/max pressure and finger width as detected */


Reply to: