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

xserver-xorg-input-synaptics: Changes to 'ubuntu-precise'



 debian/changelog                                               |    8 +-
 debian/patches/131_reset-num_active_touches-on-deviceoff.patch |   37 ++++++++++
 debian/patches/series                                          |    1 
 3 files changed, 45 insertions(+), 1 deletion(-)

New commits:
commit 5f5625c7f078cce5ac49aa8d651ad1e6fe312d87
Author: Timo Aaltonen <tjaalton@ubuntu.com>
Date:   Thu Aug 30 20:34:22 2012 +0300

    Added 130_reset-num_active_touches-on-deviceoff.patch (LP: #956071)

diff --git a/debian/changelog b/debian/changelog
index fbd782f..648b7d2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-input-synaptics (1.6.2-1ubuntu1~precise2) precise-proposed; urgency=low
+
+  * Added 130_reset-num_active_touches-on-deviceoff.patch (LP: #956071)
+
+ -- Timo Aaltonen <tjaalton@ubuntu.com>  Thu, 30 Aug 2012 20:32:12 +0300
+
 xserver-xorg-input-synaptics (1.6.2-1ubuntu1~precise1) precise-proposed; urgency=low
 
   * Fixes memory corruption by driver (LP: #941953) FDo #49439
diff --git a/debian/patches/131_reset-num_active_touches-on-deviceoff.patch b/debian/patches/131_reset-num_active_touches-on-deviceoff.patch
new file mode 100644
index 0000000..19c6b52
--- /dev/null
+++ b/debian/patches/131_reset-num_active_touches-on-deviceoff.patch
@@ -0,0 +1,37 @@
+When disabling the device, reset num_active_touches to zero. Otherwise,
+num_active_touches stays at the value it was on DeviceOff(). Future touches
+add to that value until the index may go past priv->open_slots[].
+That causes spurious memory corruption on touch ends.
+
+And as of 55fc42e7c9b4948cadd4f98ef7b6a3b12e268e3e we ignore pre-existing
+touches anyway.
+
+Test-case:
+- place num_touches fingers on the touchpad
+- xinput disable <device>
+- lift fingers
+- xinput enable <device>
+- place finger on device, num_active_touches is now (num_touches + 1)
+
+X.Org Bug 52496 <http://bugs.freedesktop.org/show_bug.cgi?id=52496>
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+--- a/src/synaptics.c
++++ b/src/synaptics.c
+@@ -1154,6 +1154,7 @@
+     priv->lastButtons = 0;
+     priv->prev_z = 0;
+     priv->prevFingers = 0;
++    priv->num_active_touches = 0;
+ #ifdef HAVE_MULTITOUCH
+     memset(priv->open_slots, 0, priv->num_slots * sizeof(int));
+ #endif
+@@ -3119,6 +3120,7 @@
+         if (hw->slot_state[i] == SLOTSTATE_OPEN) {
+             priv->open_slots[priv->num_active_touches] = i;
+             priv->num_active_touches++;
++            BUG_WARN(priv->num_active_touches > priv->num_slots);
+         }
+         else if (hw->slot_state[i] == SLOTSTATE_CLOSE) {
+             Bool found = FALSE;
diff --git a/debian/patches/series b/debian/patches/series
index 1684843..ac72104 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -20,3 +20,4 @@
 128_disable_three_click_action.patch
 129_disable_three_touch_tap.patch
 130_dont_enable_rightbutton_area.patch
+131_reset-num_active_touches-on-deviceoff.patch

commit b87609e2868a18dfc553d80b539ae70e949bb462
Author: Timo Aaltonen <tjaalton@ubuntu.com>
Date:   Thu Aug 30 20:30:27 2012 +0300

    mark the previous version uploaded

diff --git a/debian/changelog b/debian/changelog
index 60e6000..fbd782f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-xserver-xorg-input-synaptics (1.6.2-1ubuntu1~precise1) UNRELEASED; urgency=low
+xserver-xorg-input-synaptics (1.6.2-1ubuntu1~precise1) precise-proposed; urgency=low
 
   * Fixes memory corruption by driver (LP: #941953) FDo #49439
   * Fixes 'Coasting Direction is incorrect for negative VertScrollDelta/HorizScrollDelta'


Reply to: