xserver-xorg-input-synaptics: Changes to 'upstream-unstable'
configure.ac | 8 ++++++--
man/synaptics.man | 5 +----
src/eventcomm.c | 2 +-
src/synaptics.c | 47 +++++++++++++++++++++++++++++++++++++++++------
src/synproto.c | 27 +++++++++++++++++++++++++--
src/synproto.h | 3 ++-
6 files changed, 76 insertions(+), 16 deletions(-)
New commits:
commit a1162f80324c379bc7581e53275e8ff6d569f8b0
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu May 3 08:06:32 2012 +1000
synaptics 1.6.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/configure.ac b/configure.ac
index 3238e32..e5b92f9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xf86-input-synaptics],
- [1.5.99.904],
+ [1.6.0],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
[xf86-input-synaptics])
AC_CONFIG_SRCDIR([Makefile.am])
commit 52e194b76c9598e0fbf556e3aa97168ed4f0e2b6
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed May 2 10:16:30 2012 +1000
Fix coasting for negative scroll directions
1874094f0e99d8db319f6cf769ce5a25c9bc490c introduced negative scroll
directions. Coasting assumed always-positive increments and triggered an
endless scrolling loop.
Reported-by: Matthias Clasen <mclasen@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
diff --git a/src/synaptics.c b/src/synaptics.c
index 6dc8004..77eb5be 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -2625,7 +2625,8 @@ 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 * para->scroll_dist_vert;
+ double ddy = para->coasting_friction * dtime * abs(para->scroll_dist_vert);
+
priv->scroll.delta_y += priv->scroll.coast_speed_y * dtime;
delay = MIN(delay, POLL_MS);
if (abs(priv->scroll.coast_speed_y) < ddy) {
@@ -2638,7 +2639,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 * para->scroll_dist_horiz;
+ double ddx = para->coasting_friction * dtime * abs(para->scroll_dist_horiz);
priv->scroll.delta_x += priv->scroll.coast_speed_x * dtime;
delay = MIN(delay, POLL_MS);
if (abs(priv->scroll.coast_speed_x) < ddx) {
commit 6f086b86e4bd3c720289e91fdbb933bf3e559e72
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed May 2 09:16:27 2012 +1000
Fail if no backends can be found
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
diff --git a/configure.ac b/configure.ac
index dbf3fec..3238e32 100644
--- a/configure.ac
+++ b/configure.ac
@@ -120,7 +120,7 @@ case "${host}" in
BUILD_PS2COMM="yes"
;;
*)
- AC_MSG_RESULT([none])
+ AC_MSG_ERROR([Cannot find suitable backends for this platform.])
;;
esac
if test "x$BUILD_EVENTCOMM" = xyes; then
commit 655d3100fc3f06e714ec4aa01607d86509952e4b
Author: Niveditha Rau <niveditha.rau@oracle.com>
Date: Mon Apr 30 14:51:07 2012 -0700
Include a build for solaris
Signed-off-by: Niveditha Rau <niveditha.rau@oracle.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/configure.ac b/configure.ac
index eaa1c98..dbf3fec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -115,6 +115,10 @@ case "${host}" in
BUILD_PS2COMM="yes"
BUILD_PSMCOMM="yes"
;;
+*solaris*)
+ AC_MSG_RESULT([ps2comm alpscomm])
+ BUILD_PS2COMM="yes"
+ ;;
*)
AC_MSG_RESULT([none])
;;
commit d13e83b921a398b9472b07874cf5061c8a0ea6a6
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Apr 30 11:39:49 2012 +1000
Force SLOTSTATE_EMPTY on DeviceOff
SLOTSTATE_OPEN_EMPTY on resume leads to erroneously detected touches.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
diff --git a/src/eventcomm.c b/src/eventcomm.c
index 741f988..4ef8ad6 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -662,7 +662,7 @@ EventReadHwState(InputInfoPtr pInfo,
SynapticsParameters *para = &priv->synpara;
struct eventcomm_proto_data *proto_data = priv->proto_data;
- SynapticsResetTouchHwState(hw);
+ SynapticsResetTouchHwState(hw, FALSE);
/* Reset cumulative values if buttons were not previously pressed */
if (!hw->left && !hw->right && !hw->middle)
diff --git a/src/synaptics.c b/src/synaptics.c
index 935650d..6dc8004 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -1619,7 +1619,7 @@ timerFunc(OsTimerPtr timer, CARD32 now, pointer arg)
priv->hwState->millis += now - priv->timer_time;
SynapticsCopyHwState(hw, priv->hwState);
- SynapticsResetTouchHwState(hw);
+ SynapticsResetTouchHwState(hw, FALSE);
delay = HandleState(pInfo, hw, hw->millis, TRUE);
priv->timer_time = now;
@@ -1659,7 +1659,7 @@ ReadInput(InputInfoPtr pInfo)
int delay = 0;
Bool newDelay = FALSE;
- SynapticsResetTouchHwState(hw);
+ SynapticsResetTouchHwState(hw, FALSE);
while (SynapticsGetHwState(pInfo, priv, hw)) {
/* Semi-mt device touch slots do not track touches. When there is a
@@ -3017,7 +3017,7 @@ UpdateTouchState(InputInfoPtr pInfo, struct SynapticsHwState *hw)
}
}
- SynapticsResetTouchHwState(hw);
+ SynapticsResetTouchHwState(hw, FALSE);
#endif
}
diff --git a/src/synproto.c b/src/synproto.c
index cf54c4d..8e67800 100644
--- a/src/synproto.c
+++ b/src/synproto.c
@@ -153,11 +153,11 @@ SynapticsResetHwState(struct SynapticsHwState *hw)
hw->middle = 0;
memset(hw->multi, 0, sizeof(hw->multi));
- SynapticsResetTouchHwState(hw);
+ SynapticsResetTouchHwState(hw, TRUE);
}
void
-SynapticsResetTouchHwState(struct SynapticsHwState *hw)
+SynapticsResetTouchHwState(struct SynapticsHwState *hw, Bool set_slot_empty)
{
#ifdef HAVE_MULTITOUCH
int i;
@@ -175,7 +175,7 @@ SynapticsResetTouchHwState(struct SynapticsHwState *hw)
case SLOTSTATE_OPEN:
case SLOTSTATE_OPEN_EMPTY:
case SLOTSTATE_UPDATE:
- hw->slot_state[i] = SLOTSTATE_OPEN_EMPTY;
+ hw->slot_state[i] = set_slot_empty ? SLOTSTATE_EMPTY : SLOTSTATE_OPEN_EMPTY;
break;
default:
diff --git a/src/synproto.h b/src/synproto.h
index 7f80bcd..413579d 100644
--- a/src/synproto.h
+++ b/src/synproto.h
@@ -120,7 +120,7 @@ extern void SynapticsHwStateFree(struct SynapticsHwState **hw);
extern void SynapticsCopyHwState(struct SynapticsHwState *dst,
const struct SynapticsHwState *src);
extern void SynapticsResetHwState(struct SynapticsHwState *hw);
-extern void SynapticsResetTouchHwState(struct SynapticsHwState *hw);
+extern void SynapticsResetTouchHwState(struct SynapticsHwState *hw, Bool force_empty);
extern Bool SynapticsIsSoftButtonAreasValid(int *values);
commit cc595bd323aab2b0ef7b41fded2f0b5571cf0a8e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Apr 30 10:47:14 2012 +1000
Reset all hardware state on DEVICE_OFF (#49161)
Reset all state on DeviceOff to avoid stuck buttons on resume.
X.Org Bug 49161 <http://bugs.freedesktop.org/show_bug.cgi?id=49161>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
diff --git a/src/synaptics.c b/src/synaptics.c
index 51ecda5..935650d 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -1074,6 +1074,39 @@ DeviceOn(DeviceIntPtr dev)
return Success;
}
+static void
+SynapticsReset(SynapticsPrivate *priv)
+{
+ SynapticsResetHwState(priv->hwState);
+ SynapticsResetHwState(priv->local_hw_state);
+ SynapticsResetHwState(priv->old_hw_state);
+ SynapticsResetHwState(priv->comm.hwState);
+
+ memset(priv->move_hist, 0, sizeof(priv->move_hist));
+ priv->hyst_center_x = 0;
+ priv->hyst_center_y = 0;
+ memset(&priv->scroll, 0, sizeof(priv->scroll));
+ priv->count_packet_finger = 0;
+ priv->finger_state = FS_UNTOUCHED;
+ priv->last_motion_millis = 0;
+ priv->tap_state = TS_START;
+ priv->tap_button = 0;
+ priv->tap_button_state = TBS_BUTTON_UP;
+ priv->moving_state = MS_FALSE;
+ priv->vert_scroll_edge_on = FALSE;
+ priv->horiz_scroll_edge_on = FALSE;
+ priv->vert_scroll_twofinger_on = FALSE;
+ priv->horiz_scroll_twofinger_on = FALSE;
+ priv->circ_scroll_on = FALSE;
+ priv->circ_scroll_vert = FALSE;
+ priv->mid_emu_state = MBE_OFF;
+ priv->nextRepeat = 0;
+ priv->lastButtons = 0;
+ priv->prev_z = 0;
+ priv->prevFingers = 0;
+}
+
+
static Bool
DeviceOff(DeviceIntPtr dev)
{
@@ -1086,7 +1119,8 @@ DeviceOff(DeviceIntPtr dev)
if (pInfo->fd != -1) {
TimerCancel(priv->timer);
xf86RemoveEnabledDevice(pInfo);
- SynapticsResetTouchHwState(priv->hwState);
+ SynapticsReset(priv);
+
if (priv->proto_ops->DeviceOffHook &&
!priv->proto_ops->DeviceOffHook(pInfo))
rc = !Success;
diff --git a/src/synproto.c b/src/synproto.c
index 4f44f4d..cf54c4d 100644
--- a/src/synproto.c
+++ b/src/synproto.c
@@ -134,6 +134,29 @@ SynapticsCopyHwState(struct SynapticsHwState *dst,
}
void
+SynapticsResetHwState(struct SynapticsHwState *hw)
+{
+ hw->millis = 0;
+ hw->x = 0;
+ hw->y = 0;
+ hw->z = 0;
+ hw->cumulative_dx = 0;
+ hw->cumulative_dy = 0;
+ hw->numFingers = 0;
+ hw->fingerWidth = 0;
+
+ hw->left = 0;
+ hw->right = 0;
+ hw->up = 0;
+ hw->down = 0;
+
+ hw->middle = 0;
+ memset(hw->multi, 0, sizeof(hw->multi));
+
+ SynapticsResetTouchHwState(hw);
+}
+
+void
SynapticsResetTouchHwState(struct SynapticsHwState *hw)
{
#ifdef HAVE_MULTITOUCH
diff --git a/src/synproto.h b/src/synproto.h
index e16aeb0..7f80bcd 100644
--- a/src/synproto.h
+++ b/src/synproto.h
@@ -119,6 +119,7 @@ extern struct SynapticsHwState *SynapticsHwStateAlloc(SynapticsPrivate *priv);
extern void SynapticsHwStateFree(struct SynapticsHwState **hw);
extern void SynapticsCopyHwState(struct SynapticsHwState *dst,
const struct SynapticsHwState *src);
+extern void SynapticsResetHwState(struct SynapticsHwState *hw);
extern void SynapticsResetTouchHwState(struct SynapticsHwState *hw);
extern Bool SynapticsIsSoftButtonAreasValid(int *values);
commit e19fff64f76200291c22d6b822bb4e8b06816745
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Apr 30 09:30:53 2012 +1000
man: fix hyphenation
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/man/synaptics.man b/man/synaptics.man
index 6ad201b..ab6e61d 100644
--- a/man/synaptics.man
+++ b/man/synaptics.man
@@ -52,7 +52,7 @@ middle button events.
.
Not all models implement this feature.)
.IP \(bu 4
-Pressure dependent motion speed.
+Pressure-dependent motion speed.
.LP
Note that depending on the touchpad firmware, some of these features
might be available even without using the synaptics driver. Note also
commit 3cc828b4764c101f9acd0db9ee3638036ec7a948
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Apr 30 09:28:39 2012 +1000
man: drop mention of shm configuration
SHM is for debugging only now, not configuration.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/man/synaptics.man b/man/synaptics.man
index 110ad6c..6ad201b 100644
--- a/man/synaptics.man
+++ b/man/synaptics.man
@@ -53,9 +53,6 @@ middle button events.
Not all models implement this feature.)
.IP \(bu 4
Pressure dependent motion speed.
-.IP \(bu 4
-Run-time configuration using shared memory. This means you can change
-parameter settings without restarting the X server.
.LP
Note that depending on the touchpad firmware, some of these features
might be available even without using the synaptics driver. Note also
Reply to: