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

xserver-xorg-input-synaptics: Changes to 'debian-experimental'



 ChangeLog                      | 1628 +++++++++++++++++++++
 conf/50-synaptics.conf         |   18 
 configure.ac                   |   18 
 debian/changelog               |   56 
 debian/control                 |    5 
 include/synaptics-properties.h |    8 
 include/synaptics.h            |   39 
 man/synaptics.man              |   58 
 src/Makefile.am                |    3 
 src/alpscomm.c                 |  101 -
 src/eventcomm.c                |  888 ++++++++---
 src/eventcomm.h                |    9 
 src/properties.c               |  618 ++++----
 src/ps2comm.c                  |  538 +++----
 src/ps2comm.h                  |   21 
 src/psmcomm.c                  |   71 
 src/synaptics.c                | 3114 +++++++++++++++++++++++++----------------
 src/synapticsstr.h             |  356 ++--
 src/synproto.c                 |  183 ++
 src/synproto.h                 |   78 -
 test/Makefile.am               |    3 
 test/eventcomm-test.c          |  184 +-
 test/fake-symbols.c            |  199 +-
 test/fake-symbols.h            |  170 +-
 tools/synclient.c              |  593 ++++---
 tools/syndaemon.c              |  604 ++++---
 26 files changed, 6481 insertions(+), 3082 deletions(-)

New commits:
commit 582e0604e7177834b2a879790f203a0376a983d7
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date:   Mon Jul 16 14:20:06 2012 +0200

    Rebuild against xserver 1.13rc1

diff --git a/debian/changelog b/debian/changelog
index 0139cde..555aed5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-input-synaptics (1.6.2-2) UNRELEASED; urgency=low
+
+  * Rebuild against xserver 1.13rc1
+
+ -- Maarten Lankhorst <maarten.lankhorst@canonical.com>  Mon, 16 Jul 2012 14:15:22 +0200
+
 xserver-xorg-input-synaptics (1.6.2-1) unstable; urgency=low
 
   * New upstream release, from the 1.6 branch.
diff --git a/debian/control b/debian/control
index 42f77a6..c7d440c 100644
--- a/debian/control
+++ b/debian/control
@@ -11,7 +11,7 @@ Build-Depends:
  libxi-dev (>= 2:1.2.0),
  libxtst-dev,
  x11proto-core-dev,
- xserver-xorg-dev (>= 2:1.11.99.901),
+ xserver-xorg-dev (>= 2:1.12.99.901),
  pkg-config,
  quilt,
  xutils-dev (>= 1:7.5+4),

commit 1b7a3baa3f8f7c71a3264e50cabf7461afc9d463
Author: Cyril Brulebois <kibi@debian.org>
Date:   Wed Jun 13 22:22:46 2012 +0200

    Upload to unstable.

diff --git a/debian/changelog b/debian/changelog
index 0547378..9801715 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,8 @@
-xserver-xorg-input-synaptics (1.6.2-1) UNRELEASED; urgency=low
+xserver-xorg-input-synaptics (1.6.2-1) unstable; urgency=low
 
   * New upstream release, from the 1.6 branch.
 
- -- Cyril Brulebois <kibi@debian.org>  Wed, 13 Jun 2012 22:21:59 +0200
+ -- Cyril Brulebois <kibi@debian.org>  Wed, 13 Jun 2012 22:22:42 +0200
 
 xserver-xorg-input-synaptics (1.6.1-1) unstable; urgency=low
 

commit f0998d15565eaae5b6189a535d5d584fff071874
Author: Cyril Brulebois <kibi@debian.org>
Date:   Wed Jun 13 22:22:27 2012 +0200

    Bump changelogs.

diff --git a/ChangeLog b/ChangeLog
index 187be52..1c01053 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,133 @@
+commit d5ff9d8b0b186cf39695df84a10984eac559b746
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Jun 12 13:46:34 2012 +1000
+
+    synaptics 1.6.2
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit c1aae820601a911432c64938f03eab62bafaab2f
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri May 18 09:38:50 2012 +1000
+
+    synaptics 1.6.1.901
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 7ccca8e7d8fbf2ccb5a2dbbfbf06ff4dbd6b7149
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu May 17 12:10:04 2012 +1000
+
+    Don't allow for scroll distances of 0 (#49965)
+    
+    It'll either hang the server or blow up with divisions by 0, whichever one
+    comes first.
+    
+    X.Org Bug 49965 <http://bugs.freedesktop.org/show_bug.cgi?id=49965>
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
+    (cherry picked from commit 6d47d334d8a876e7e094306c313246b87016b78a)
+
+commit f8d970e191e6df05a8f2c26afdeea3e27b941a62
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu May 17 11:02:02 2012 +1000
+
+    Reset hw->x/y to INT_MIN and skip HandleState until we have x/y events
+    
+    The driver assumes x/y is always valid but after coming from a resume we may
+    get a few events with either ABS_X or ABS_Y (not both). Thus we process with
+    hw->x == 0 and hw->y == somevalue, causing cursor jumps when calculating
+    deltas whenver the real hw->x comes in.
+    
+    Fix this by resetting hw->x/y to INT_MIN and skip state processing until
+    both axes are available.
+    
+    For clickpads, this means handling of data will be delayed until we get
+    at least one motion on each axis. Button presses won't be recognised either
+    until that happens. It requires some skill to not trigger motion on both
+    axes, even more to press a button without doing so.
+    
+    For non-clickpads, handling of motion events will be delayed likewise. If a
+    physical button is pressed immediately after resume we have to assume deltas
+    of x/y.
+    - If the next event is a new touch, it will have ABS_X/ABS_Y set anyway
+    - If the finger was already down, a button event is generated, and the
+      finger has generated ABS_X or ABS_Y only before the event, the next event
+      containing the missing data will cause a jump. The fix for this is more
+      invasive and this is quite a corner-case.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
+    (cherry picked from commit cd569377cda9b5a4ee00c0137db14f625c76c40f)
+
+commit 739175d198372a3226ce061b118d8fe5bbc8f6bf
+Author: Chase Douglas <chase.douglas@canonical.com>
+Date:   Wed May 16 07:49:25 2012 -0700
+
+    Reset open slots array on device disable
+    
+    The open slots array is used for clickpad cumulative delta computation.
+    If the array is not reset and becomes corrupted during the device
+    disable/enable cycle, the cumulative deltas may be wrong. This manifests
+    as jumpy cursor behavior on some clickpads after suspend/resume.
+    
+    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit 0054b144f3daf00e46a35b2f165befb209df94fc)
+
+commit 67a02d676c96d5b3d4729290cd96af0201eb76bb
+Author: Chun Yang <Chuck.Yang@gmail.com>
+Date:   Tue May 15 14:51:42 2012 -0500
+
+    Fix coasting for negative ScrollDelta
+    
+    Fix the coasting direction for when VertScrollDelta or HorizScrollDelta is
+    negative.
+    
+    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=49966
+    
+    Regression introduced in 0de4445ff8e75aab208faf6383e76045934c6720
+    
+    Signed-off-by: Chun Yang <Chuck.Yang@gmail.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit 53557a5cab1e253dc8f4393207954ae0fe76068f)
+
+commit 23e87b57bb874326c88a7ad7292bec51959fb876
+Author: Chase Douglas <chase.douglas@canonical.com>
+Date:   Mon May 14 10:20:01 2012 -0700
+
+    Ignore pre-existing touches
+    
+    If a touch is physically active when the device is enabled, then all
+    events for that touch must be ignored. In particular, we cannot close
+    the touch or we will decrement touch count counters below zero. If these
+    counters go below zero memory corruption can occur.
+    
+    Note that a device is disabled and enabled every time the user types on
+    the keyboard if synclient is used to disable the trackpad while typing.
+    This is a very common option.
+    
+    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit 55fc42e7c9b4948cadd4f98ef7b6a3b12e268e3e)
+
+commit 23065a974e5dcdf0d6a436a0547bb7887d306a6f
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri May 11 12:27:39 2012 +1000
+
+    Avoid out-of-bounds access by running num_active_touches < 0 (#49439)
+    
+    If a touch is active during driver init, the slot will be set to
+    SLOTSTATE_CLOSE when it finishes. That could decrease num_active_touches to
+    less than 0, causing out-of-bounds access.
+    
+    X.Org Bug 49439 <http://bugs.freedesktop.org/show_bug.cgi?id=49439>
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
+    (cherry picked from commit 77d766b1d535dff9a27c7db343ede85d9f44850b)
+
 commit e0f5688994baa85a8c658120681575cdd0ba2a58
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Fri May 11 10:30:21 2012 +1000
diff --git a/debian/changelog b/debian/changelog
index 6bd821f..0547378 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-input-synaptics (1.6.2-1) UNRELEASED; urgency=low
+
+  * New upstream release, from the 1.6 branch.
+
+ -- Cyril Brulebois <kibi@debian.org>  Wed, 13 Jun 2012 22:21:59 +0200
+
 xserver-xorg-input-synaptics (1.6.1-1) unstable; urgency=low
 
   [ Julien Cristau ]

commit d5ff9d8b0b186cf39695df84a10984eac559b746
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Jun 12 13:46:34 2012 +1000

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

diff --git a/configure.ac b/configure.ac
index 3e7ec2a..894d4f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-input-synaptics],
-        [1.6.1.901],
+        [1.6.2],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-input-synaptics])
 AC_CONFIG_SRCDIR([Makefile.am])

commit e4ff8744d2c148fc633511ccafd0df046e8109b8
Author: Cyril Brulebois <kibi@debian.org>
Date:   Sun May 20 16:50:21 2012 +0200

    Upload to unstable.

diff --git a/debian/changelog b/debian/changelog
index 1c95e36..6bd821f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-xserver-xorg-input-synaptics (1.6.1-1) UNRELEASED; urgency=low
+xserver-xorg-input-synaptics (1.6.1-1) unstable; urgency=low
 
   [ Julien Cristau ]
   * The mtdev build-dep is linux-only (closes: #672572).  Thanks, Pino
@@ -7,7 +7,7 @@ xserver-xorg-input-synaptics (1.6.1-1) UNRELEASED; urgency=low
   [ Cyril Brulebois ]
   * New upstream release, from the 1.6 branch.
 
- -- Cyril Brulebois <kibi@debian.org>  Sun, 20 May 2012 16:49:15 +0200
+ -- Cyril Brulebois <kibi@debian.org>  Sun, 20 May 2012 16:50:18 +0200
 
 xserver-xorg-input-synaptics (1.6.0-1) unstable; urgency=low
 

commit 0980c2f76f7989cb83bc1397c94825f5ce969f8d
Author: Cyril Brulebois <kibi@debian.org>
Date:   Sun May 20 16:49:43 2012 +0200

    Bump changelogs.

diff --git a/ChangeLog b/ChangeLog
index 45c61db..187be52 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,95 @@
+commit e0f5688994baa85a8c658120681575cdd0ba2a58
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri May 11 10:30:21 2012 +1000
+
+    synaptics 1.6.1
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 7f2d9d88204c62de3cb63b48001b9e2408d3a20d
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri May 11 10:54:47 2012 +1000
+
+    tools: coasting speed is not capped at 20, cap it at 255
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit 0352c67fa2a7224b5a3bf03a934b3c7af42b4f51)
+
+commit ace20a02c371478f6a9d224dfd31ea219d91fc46
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed May 9 14:26:40 2012 +1000
+
+    Fix coasting speed trigger
+    
+    CoastingSpeed is defined as scrolls/s. The previous code just used
+    delta/seconds which depended on the device coordinate range and exceeded the
+    default CoastingSpeed at almost any scroll event.
+    
+    Divide the estimated delta by the scroll distance to get the accurate
+    scrolls/s number. Since that now changes the contents of what's in
+    coast_speed_y, change the users of that too.
+    
+    http://bugzilla.redhat.com/813686
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit 0de4445ff8e75aab208faf6383e76045934c6720)
+
+commit 04d24116db59872d4cd00f38a0d1c87957fe4914
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed May 9 12:23:46 2012 +1000
+
+    Don't check for soft buttons if a button is already down
+    
+    Moving into a different soft button's area during drag-n-drop would trigger
+    a click of that button.
+    
+    We only have the current button state and we mess with it, so the conditions
+    for a possible clickpad soft-button event are:
+    - hw->left is down now
+    - none of left|right|middle were down before. since we change hw->left to
+      hw->right/left we need to check all three
+    
+    If hw->left is down but one of the other buttons was already down, copy that
+    button state and continue.
+    
+    http://bugzilla.redhat.com/819348
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
+    (cherry picked from commit a1d6784d790f081f8a6ea3a10d3cfa578aa10d5b)
+
+commit 4e8ddb3a6f1ba1f7642f0a23d6f22a8c40d68cf0
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu May 3 12:00:50 2012 +1000
+
+    whitespace fix
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
+
+commit d1eebac72e4a5cc7a67efead13fbd32f9cd1fbd9
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu May 3 14:21:24 2012 +1000
+
+    tools: undo indentation in synclient's parameter list
+    
+    more more readable this way
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
+
+commit 0434d7776640861d0c8c19a02c2445d2f61627f8
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu May 3 11:49:31 2012 +1000
+
+    Indent consistently
+    
+    x-indent-all.sh from xorg/util/modular as of
+    c2d630fab65dbe3409af3947f6f442782ddb026f
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
+
 commit a1162f80324c379bc7581e53275e8ff6d569f8b0
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Thu May 3 08:06:32 2012 +1000
diff --git a/debian/changelog b/debian/changelog
index 7806412..1c95e36 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,13 @@
-xserver-xorg-input-synaptics (1.6.0-2) UNRELEASED; urgency=low
+xserver-xorg-input-synaptics (1.6.1-1) UNRELEASED; urgency=low
 
+  [ Julien Cristau ]
   * The mtdev build-dep is linux-only (closes: #672572).  Thanks, Pino
     Toscano!
 
- -- Julien Cristau <jcristau@debian.org>  Sat, 12 May 2012 10:16:20 +0200
+  [ Cyril Brulebois ]
+  * New upstream release, from the 1.6 branch.
+
+ -- Cyril Brulebois <kibi@debian.org>  Sun, 20 May 2012 16:49:15 +0200
 
 xserver-xorg-input-synaptics (1.6.0-1) unstable; urgency=low
 

commit c1aae820601a911432c64938f03eab62bafaab2f
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri May 18 09:38:50 2012 +1000

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

diff --git a/configure.ac b/configure.ac
index 565daf2..3e7ec2a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-input-synaptics],
-        [1.6.1],
+        [1.6.1.901],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-input-synaptics])
 AC_CONFIG_SRCDIR([Makefile.am])

commit 7ccca8e7d8fbf2ccb5a2dbbfbf06ff4dbd6b7149
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu May 17 12:10:04 2012 +1000

    Don't allow for scroll distances of 0 (#49965)
    
    It'll either hang the server or blow up with divisions by 0, whichever one
    comes first.
    
    X.Org Bug 49965 <http://bugs.freedesktop.org/show_bug.cgi?id=49965>
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
    (cherry picked from commit 6d47d334d8a876e7e094306c313246b87016b78a)

diff --git a/src/properties.c b/src/properties.c
index 44ac306..3b3f1c5 100644
--- a/src/properties.c
+++ b/src/properties.c
@@ -519,6 +519,9 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
             return BadMatch;
 
         dist = (INT32 *) prop->data;
+        if (dist[0] == 0 || dist[1] == 0)
+            return BadValue;
+
         if (para->scroll_dist_vert != dist[0]) {
             para->scroll_dist_vert = dist[0];
 #ifdef HAVE_SMOOTH_SCROLL
@@ -715,6 +718,9 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
             return BadMatch;
 
         circdist = *(float *) prop->data;
+        if (circdist == 0)
+            return BadValue;
+
         para->scroll_dist_circ = circdist;
     }
     else if (property == prop_circscroll_trigger) {

commit f8d970e191e6df05a8f2c26afdeea3e27b941a62
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu May 17 11:02:02 2012 +1000

    Reset hw->x/y to INT_MIN and skip HandleState until we have x/y events
    
    The driver assumes x/y is always valid but after coming from a resume we may
    get a few events with either ABS_X or ABS_Y (not both). Thus we process with
    hw->x == 0 and hw->y == somevalue, causing cursor jumps when calculating
    deltas whenver the real hw->x comes in.
    
    Fix this by resetting hw->x/y to INT_MIN and skip state processing until
    both axes are available.
    
    For clickpads, this means handling of data will be delayed until we get
    at least one motion on each axis. Button presses won't be recognised either
    until that happens. It requires some skill to not trigger motion on both
    axes, even more to press a button without doing so.
    
    For non-clickpads, handling of motion events will be delayed likewise. If a
    physical button is pressed immediately after resume we have to assume deltas
    of x/y.
    - If the next event is a new touch, it will have ABS_X/ABS_Y set anyway
    - If the finger was already down, a button event is generated, and the
      finger has generated ABS_X or ABS_Y only before the event, the next event
      containing the missing data will cause a jump. The fix for this is more
      invasive and this is quite a corner-case.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
    (cherry picked from commit cd569377cda9b5a4ee00c0137db14f625c76c40f)

diff --git a/src/synaptics.c b/src/synaptics.c
index 78660f4..cd9f936 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -3278,6 +3278,19 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now,
         return delay;
     }
 
+    /* We need both and x/y, the driver can't handle just one of the two
+     * yet. But since it's possible to hit a phys button on non-clickpads
+     * without ever getting motion data first, we must continue with 0/0 for
+     * that case. */
+    if (hw->x == INT_MIN || hw->y == INT_MAX) {
+        if (para->clickpad)
+            return delay;
+        else if (hw->left || hw->right || hw->middle) {
+            hw->x = (hw->x == INT_MIN) ? 0 : hw->x;
+            hw->y = (hw->y == INT_MIN) ? 0 : hw->y;
+        }
+    }
+
     /* If a physical button is pressed on a clickpad, use cumulative relative
      * touch movements for motion */
     if (para->clickpad && (hw->left || hw->right || hw->middle)) {
diff --git a/src/synproto.c b/src/synproto.c
index d6e8c65..0c8a066 100644
--- a/src/synproto.c
+++ b/src/synproto.c
@@ -134,8 +134,8 @@ void
 SynapticsResetHwState(struct SynapticsHwState *hw)
 {
     hw->millis = 0;
-    hw->x = 0;
-    hw->y = 0;
+    hw->x = INT_MIN;
+    hw->y = INT_MIN;
     hw->z = 0;
     hw->cumulative_dx = 0;
     hw->cumulative_dy = 0;

commit 739175d198372a3226ce061b118d8fe5bbc8f6bf
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Wed May 16 07:49:25 2012 -0700

    Reset open slots array on device disable
    
    The open slots array is used for clickpad cumulative delta computation.
    If the array is not reset and becomes corrupted during the device
    disable/enable cycle, the cumulative deltas may be wrong. This manifests
    as jumpy cursor behavior on some clickpads after suspend/resume.
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 0054b144f3daf00e46a35b2f165befb209df94fc)

diff --git a/src/synaptics.c b/src/synaptics.c
index 074bcb8..78660f4 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -1153,6 +1153,9 @@ SynapticsReset(SynapticsPrivate * priv)
     priv->lastButtons = 0;
     priv->prev_z = 0;
     priv->prevFingers = 0;
+#ifdef HAVE_MULTITOUCH
+    memset(priv->open_slots, 0, priv->num_slots * sizeof(int));
+#endif
 }
 
 static Bool

commit 67a02d676c96d5b3d4729290cd96af0201eb76bb
Author: Chun Yang <Chuck.Yang@gmail.com>
Date:   Tue May 15 14:51:42 2012 -0500

    Fix coasting for negative ScrollDelta
    
    Fix the coasting direction for when VertScrollDelta or HorizScrollDelta is
    negative.
    
    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=49966
    
    Regression introduced in 0de4445ff8e75aab208faf6383e76045934c6720
    
    Signed-off-by: Chun Yang <Chuck.Yang@gmail.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 53557a5cab1e253dc8f4393207954ae0fe76068f)

diff --git a/src/synaptics.c b/src/synaptics.c
index 1d32093..074bcb8 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -2740,7 +2740,7 @@ HandleScrolling(SynapticsPrivate * priv, struct SynapticsHwState *hw,
         double dtime = (hw->millis - priv->scroll.last_millis) / 1000.0;
         double ddy = para->coasting_friction * dtime;
 
-        priv->scroll.delta_y += priv->scroll.coast_speed_y * dtime * para->scroll_dist_vert;
+        priv->scroll.delta_y += priv->scroll.coast_speed_y * dtime * abs(para->scroll_dist_vert);
         delay = MIN(delay, POLL_MS);
         if (abs(priv->scroll.coast_speed_y) < ddy) {
             priv->scroll.coast_speed_y = 0;
@@ -2755,7 +2755,7 @@ HandleScrolling(SynapticsPrivate * priv, struct SynapticsHwState *hw,
     if (priv->scroll.coast_speed_x) {
         double dtime = (hw->millis - priv->scroll.last_millis) / 1000.0;
         double ddx = para->coasting_friction * dtime;
-        priv->scroll.delta_x += priv->scroll.coast_speed_x * dtime * para->scroll_dist_vert;
+        priv->scroll.delta_x += priv->scroll.coast_speed_x * dtime * abs(para->scroll_dist_horiz);
         delay = MIN(delay, POLL_MS);
         if (abs(priv->scroll.coast_speed_x) < ddx) {
             priv->scroll.coast_speed_x = 0;

commit 23e87b57bb874326c88a7ad7292bec51959fb876
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Mon May 14 10:20:01 2012 -0700

    Ignore pre-existing touches
    
    If a touch is physically active when the device is enabled, then all
    events for that touch must be ignored. In particular, we cannot close
    the touch or we will decrement touch count counters below zero. If these
    counters go below zero memory corruption can occur.
    
    Note that a device is disabled and enabled every time the user types on
    the keyboard if synclient is used to disable the trackpad while typing.
    This is a very common option.
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 55fc42e7c9b4948cadd4f98ef7b6a3b12e268e3e)

diff --git a/src/eventcomm.c b/src/eventcomm.c
index 89a8a3a..280ef9b 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -564,8 +564,7 @@ EventProcessTouchEvent(InputInfoPtr pInfo, struct SynapticsHwState *hw,
         if (slot_index < 0)
             return;
 
-        if (hw->slot_state[slot_index] == SLOTSTATE_EMPTY ||
-            hw->slot_state[slot_index] == SLOTSTATE_OPEN_EMPTY)
+        if (hw->slot_state[slot_index] == SLOTSTATE_OPEN_EMPTY)
             hw->slot_state[slot_index] = SLOTSTATE_UPDATE;
         if (ev->code == ABS_MT_TRACKING_ID) {
             if (ev->value >= 0) {
@@ -580,7 +579,7 @@ EventProcessTouchEvent(InputInfoPtr pInfo, struct SynapticsHwState *hw,
                                 "Attempted to copy values from out-of-range "
                                 "slot, touch events may be incorrect.\n");
             }
-            else {
+            else if (hw->slot_state[slot_index] != SLOTSTATE_EMPTY) {
                 hw->slot_state[slot_index] = SLOTSTATE_CLOSE;
                 proto_data->num_touches--;
             }

commit 23065a974e5dcdf0d6a436a0547bb7887d306a6f
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri May 11 12:27:39 2012 +1000

    Avoid out-of-bounds access by running num_active_touches < 0 (#49439)
    
    If a touch is active during driver init, the slot will be set to
    SLOTSTATE_CLOSE when it finishes. That could decrease num_active_touches to
    less than 0, causing out-of-bounds access.
    
    X.Org Bug 49439 <http://bugs.freedesktop.org/show_bug.cgi?id=49439>
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
    (cherry picked from commit 77d766b1d535dff9a27c7db343ede85d9f44850b)

diff --git a/src/synaptics.c b/src/synaptics.c
index 30d79c5..1d32093 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -3128,7 +3128,9 @@ UpdateTouchState(InputInfoPtr pInfo, struct SynapticsHwState *hw)
                     priv->open_slots[j] = priv->open_slots[j + 1];
             }
 
-            priv->num_active_touches--;
+            BUG_WARN(priv->num_active_touches == 0);
+            if (priv->num_active_touches > 0)
+                priv->num_active_touches--;
         }
     }
 

commit 02e8ea3dbdc424eb934d3eb65b5e2d66e8055d57
Author: Julien Cristau <jcristau@debian.org>
Date:   Sat May 12 10:17:01 2012 +0200

    The mtdev build-dep is linux-only (closes: #672572).
    
    Thanks, Pino Toscano!

diff --git a/debian/changelog b/debian/changelog
index 121024a..7806412 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+xserver-xorg-input-synaptics (1.6.0-2) UNRELEASED; urgency=low
+
+  * The mtdev build-dep is linux-only (closes: #672572).  Thanks, Pino
+    Toscano!
+
+ -- Julien Cristau <jcristau@debian.org>  Sat, 12 May 2012 10:16:20 +0200
+
 xserver-xorg-input-synaptics (1.6.0-1) unstable; urgency=low
 
   * New upstream release.
diff --git a/debian/control b/debian/control
index d18a9e0..5525aa4 100644
--- a/debian/control
+++ b/debian/control
@@ -15,7 +15,7 @@ Build-Depends:
  pkg-config,
  quilt,
  xutils-dev (>= 1:7.5+4),
- libmtdev-dev,
+ libmtdev-dev [linux-any],
 Standards-Version: 3.9.2
 Vcs-Git: git://git.debian.org/git/pkg-xorg/driver/xserver-xorg-input-synaptics
 Vcs-Browser: http://git.debian.org/?p=pkg-xorg/driver/xserver-xorg-input-synaptics.git

commit e0f5688994baa85a8c658120681575cdd0ba2a58
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri May 11 10:30:21 2012 +1000

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

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

commit 7f2d9d88204c62de3cb63b48001b9e2408d3a20d
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri May 11 10:54:47 2012 +1000

    tools: coasting speed is not capped at 20, cap it at 255
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 0352c67fa2a7224b5a3bf03a934b3c7af42b4f51)

diff --git a/tools/synclient.c b/tools/synclient.c
index 7ec6923..f08a275 100644
--- a/tools/synclient.c
+++ b/tools/synclient.c
@@ -130,7 +130,7 @@ static struct Parameter params[] = {
     {"PalmDetect",            PT_BOOL,   0, 1,     SYNAPTICS_PROP_PALM_DETECT,	8,	0},
     {"PalmMinWidth",          PT_INT,    0, 15,    SYNAPTICS_PROP_PALM_DIMENSIONS,	32,	0},
     {"PalmMinZ",              PT_INT,    0, 255,   SYNAPTICS_PROP_PALM_DIMENSIONS,	32,	1},
-    {"CoastingSpeed",         PT_DOUBLE, 0, 20,    SYNAPTICS_PROP_COASTING_SPEED,	0 /* float*/,	0},
+    {"CoastingSpeed",         PT_DOUBLE, 0, 255,    SYNAPTICS_PROP_COASTING_SPEED,	0 /* float*/,	0},
     {"CoastingFriction",      PT_DOUBLE, 0, 255,   SYNAPTICS_PROP_COASTING_SPEED,	0 /* float*/,	1},
     {"PressureMotionMinZ",    PT_INT,    1, 255,   SYNAPTICS_PROP_PRESSURE_MOTION,	32,	0},
     {"PressureMotionMaxZ",    PT_INT,    1, 255,   SYNAPTICS_PROP_PRESSURE_MOTION,	32,	1},

commit ace20a02c371478f6a9d224dfd31ea219d91fc46
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed May 9 14:26:40 2012 +1000

    Fix coasting speed trigger
    
    CoastingSpeed is defined as scrolls/s. The previous code just used
    delta/seconds which depended on the device coordinate range and exceeded the
    default CoastingSpeed at almost any scroll event.
    
    Divide the estimated delta by the scroll distance to get the accurate
    scrolls/s number. Since that now changes the contents of what's in
    coast_speed_y, change the users of that too.
    
    http://bugzilla.redhat.com/813686
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 0de4445ff8e75aab208faf6383e76045934c6720)

diff --git a/src/synaptics.c b/src/synaptics.c
index ee627b3..30d79c5 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -2456,7 +2456,7 @@ start_coasting(SynapticsPrivate * priv, struct SynapticsHwState *hw,
             double dy =
                 estimate_delta(HIST(0).y, HIST(1).y, HIST(2).y, HIST(3).y);
             if (pkt_time > 0) {
-                double scrolls_per_sec = dy / pkt_time;
+                double scrolls_per_sec = (dy / abs(para->scroll_dist_vert)) / pkt_time;
 
                 if (fabs(scrolls_per_sec) >= para->coasting_speed) {
                     priv->scroll.coast_speed_y = scrolls_per_sec;
@@ -2468,7 +2468,7 @@ start_coasting(SynapticsPrivate * priv, struct SynapticsHwState *hw,
             double dx =
                 estimate_delta(HIST(0).x, HIST(1).x, HIST(2).x, HIST(3).x);
             if (pkt_time > 0) {
-                double scrolls_per_sec = dx / pkt_time;
+                double scrolls_per_sec = (dx / abs(para->scroll_dist_vert)) / pkt_time;
 
                 if (fabs(scrolls_per_sec) >= para->coasting_speed) {
                     priv->scroll.coast_speed_x = scrolls_per_sec;
@@ -2480,7 +2480,7 @@ start_coasting(SynapticsPrivate * priv, struct SynapticsHwState *hw,
             double da = estimate_delta_circ(priv);
 
             if (pkt_time > 0) {
-                double scrolls_per_sec = da / pkt_time;
+                double scrolls_per_sec = (da / para->scroll_dist_circ) / pkt_time;
 
                 if (fabs(scrolls_per_sec) >= para->coasting_speed) {
                     if (vert) {
@@ -2738,10 +2738,9 @@ HandleScrolling(SynapticsPrivate * priv, struct SynapticsHwState *hw,
 
     if (priv->scroll.coast_speed_y) {
         double dtime = (hw->millis - priv->scroll.last_millis) / 1000.0;
-        double ddy =
-            para->coasting_friction * dtime * abs(para->scroll_dist_vert);
+        double ddy = para->coasting_friction * dtime;
 
-        priv->scroll.delta_y += priv->scroll.coast_speed_y * dtime;
+        priv->scroll.delta_y += priv->scroll.coast_speed_y * dtime * para->scroll_dist_vert;
         delay = MIN(delay, POLL_MS);
         if (abs(priv->scroll.coast_speed_y) < ddy) {
             priv->scroll.coast_speed_y = 0;
@@ -2755,9 +2754,8 @@ HandleScrolling(SynapticsPrivate * priv, struct SynapticsHwState *hw,
 
     if (priv->scroll.coast_speed_x) {
         double dtime = (hw->millis - priv->scroll.last_millis) / 1000.0;
-        double ddx =
-            para->coasting_friction * dtime * abs(para->scroll_dist_horiz);
-        priv->scroll.delta_x += priv->scroll.coast_speed_x * dtime;
+        double ddx = para->coasting_friction * dtime;
+        priv->scroll.delta_x += priv->scroll.coast_speed_x * dtime * para->scroll_dist_vert;
         delay = MIN(delay, POLL_MS);
         if (abs(priv->scroll.coast_speed_x) < ddx) {
             priv->scroll.coast_speed_x = 0;
diff --git a/src/synapticsstr.h b/src/synapticsstr.h
index 57ed4ba..dd6a09b 100644
--- a/src/synapticsstr.h
+++ b/src/synapticsstr.h
@@ -168,7 +168,7 @@ typedef struct _SynapticsParameters {
     Bool palm_detect;           /* Enable Palm Detection */
     int palm_min_width;         /* Palm detection width */
     int palm_min_z;             /* Palm detection depth */
-    double coasting_speed;      /* Coasting threshold scrolling speed */
+    double coasting_speed;      /* Coasting threshold scrolling speed in scrolls/s */
     double coasting_friction;   /* Number of scrolls per second per second to change coasting speed */
     int press_motion_min_z;     /* finger pressure at which minimum pressure motion factor is applied */
     int press_motion_max_z;     /* finger pressure at which maximum pressure motion factor is applied */
@@ -216,8 +216,8 @@ struct _SynapticsPrivateRec {
         double delta_y;         /* accumulated vert scroll delta */
         double last_a;          /* last angle-scroll position */
         CARD32 last_millis;     /* time last scroll event posted */
-        double coast_speed_x;   /* Horizontal coasting speed */
-        double coast_speed_y;   /* Vertical coasting speed */
+        double coast_speed_x;   /* Horizontal coasting speed in scrolls/s */
+        double coast_speed_y;   /* Vertical coasting speed in scrolls/s */
         double coast_delta_x;   /* Accumulated horizontal coast delta */
         double coast_delta_y;   /* Accumulated vertical coast delta */
         int packets_this_scroll;        /* Events received for this scroll */

commit 04d24116db59872d4cd00f38a0d1c87957fe4914
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed May 9 12:23:46 2012 +1000

    Don't check for soft buttons if a button is already down
    
    Moving into a different soft button's area during drag-n-drop would trigger
    a click of that button.
    
    We only have the current button state and we mess with it, so the conditions
    for a possible clickpad soft-button event are:
    - hw->left is down now
    - none of left|right|middle were down before. since we change hw->left to
      hw->right/left we need to check all three
    
    If hw->left is down but one of the other buttons was already down, copy that
    button state and continue.
    
    http://bugzilla.redhat.com/819348
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
    (cherry picked from commit a1d6784d790f081f8a6ea3a10d3cfa578aa10d5b)

diff --git a/src/synaptics.c b/src/synaptics.c
index 809a275..ee627b3 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -2956,14 +2956,23 @@ update_hw_button_state(const InputInfoPtr pInfo, struct SynapticsHwState *hw,
 
     /* If this is a clickpad and the user clicks in a soft button area, press
      * the soft button instead. */
-    if (para->clickpad && hw->left && !hw->right && !hw->middle) {
-        if (is_inside_rightbutton_area(para, hw->x, hw->y)) {
-            hw->left = 0;
-            hw->right = 1;
-        }
-        else if (is_inside_middlebutton_area(para, hw->x, hw->y)) {
-            hw->left = 0;
-            hw->middle = 1;
+    if (para->clickpad) {
+        /* hw->left is down, but no other buttons were already down */
+        if (!old->left && !old->right && !old->middle &&
+            hw->left && !hw->right && !hw->middle) {
+                if (is_inside_rightbutton_area(para, hw->x, hw->y)) {
+                    hw->left = 0;
+                    hw->right = 1;
+                }
+                else if (is_inside_middlebutton_area(para, hw->x, hw->y)) {
+                    hw->left = 0;
+                    hw->middle = 1;
+                }
+        }
+        else if (hw->left) {
+            hw->left = old->left;
+            hw->right = old->right;
+            hw->middle = old->middle;
         }
     }
 

commit 4e8ddb3a6f1ba1f7642f0a23d6f22a8c40d68cf0
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu May 3 12:00:50 2012 +1000

    whitespace fix
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>

diff --git a/src/ps2comm.h b/src/ps2comm.h
index 6f1a96a..2be55e4 100644
--- a/src/ps2comm.h
+++ b/src/ps2comm.h
@@ -27,7 +27,7 @@
 #include "xf86_OSproc.h"
 
 /* acknowledge for commands and parameter */
-#define PS2_ACK 			0xFA
+#define PS2_ACK				0xFA
 #define PS2_ERROR			0xFC
 
 /* standard PS/2 commands */
@@ -56,7 +56,7 @@
 #define SYN_BIT_W_MODE			(1 << 0)
 
 /* synaptics model ID bits */
-#define SYN_MODEL_ROT180(synhw) 	((synhw)->model_id & (1 << 23))
+#define SYN_MODEL_ROT180(synhw)		((synhw)->model_id & (1 << 23))
 #define SYN_MODEL_PORTRAIT(synhw)	((synhw)->model_id & (1 << 22))
 #define SYN_MODEL_SENSOR(synhw)		(((synhw)->model_id >> 16) & 0x3f)
 #define SYN_MODEL_HARDWARE(synhw)	(((synhw)->model_id >> 9) & 0x7f)

commit d1eebac72e4a5cc7a67efead13fbd32f9cd1fbd9
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu May 3 14:21:24 2012 +1000

    tools: undo indentation in synclient's parameter list
    
    more more readable this way
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>

diff --git a/tools/synclient.c b/tools/synclient.c
index 6ff3aa6..7ec6923 100644
--- a/tools/synclient.c
+++ b/tools/synclient.c
@@ -73,129 +73,87 @@ struct Parameter {
 };
 
 static struct Parameter params[] = {
-    {"LeftEdge", PT_INT, 0, 10000, SYNAPTICS_PROP_EDGES, 32, 0},
-    {"RightEdge", PT_INT, 0, 10000, SYNAPTICS_PROP_EDGES, 32, 1},
-    {"TopEdge", PT_INT, 0, 10000, SYNAPTICS_PROP_EDGES, 32, 2},
-    {"BottomEdge", PT_INT, 0, 10000, SYNAPTICS_PROP_EDGES, 32, 3},
-    {"FingerLow", PT_INT, 0, 255, SYNAPTICS_PROP_FINGER, 32, 0},
-    {"FingerHigh", PT_INT, 0, 255, SYNAPTICS_PROP_FINGER, 32, 1},
-    {"FingerPress", PT_INT, 0, 256, SYNAPTICS_PROP_FINGER, 32, 2},
-    {"MaxTapTime", PT_INT, 0, 1000, SYNAPTICS_PROP_TAP_TIME, 32, 0},


Reply to: