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

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



 ChangeLog                                                 |  119 ++++++++++++
 conf/50-synaptics.conf                                    |   18 +
 configure.ac                                              |    2 
 debian/changelog                                          |   13 +
 debian/patches/130_dont_enable_rightbutton_area.patch     |   43 ++++
 debian/patches/200_fix_clickfinger_non-clickpads.patch    |   96 ----------
 debian/patches/200_fix_four_tap.patch                     |  129 ++++++++++++++
 debian/patches/201_fix_clickfinger_clickpad_actions.patch |  115 ------------
 debian/patches/series                                     |    4 
 man/synaptics.man                                         |    2 
 src/eventcomm.c                                           |    3 
 src/synaptics.c                                           |   51 ++++-
 src/synapticsstr.h                                        |    2 
 src/synproto.c                                            |   13 +
 src/synproto.h                                            |    1 
 15 files changed, 384 insertions(+), 227 deletions(-)

New commits:
commit 20d3435c18d7ec85089dee9d47eba4bfb4b512b2
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Fri Mar 23 11:05:23 2012 -0700

    Fix erroneous tap actions on four-touch tap (LP: #963327)
    
    * Fix erroneous tap actions on four-touch tap (LP: #963327)
      - Add temporary patch 200_fix_four_tap.patch

diff --git a/debian/changelog b/debian/changelog
index 8a95dfa..5d12796 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,8 +6,10 @@ xserver-xorg-input-synaptics (1.5.99.902-0ubuntu1) UNRELEASED; urgency=low
     - 201_fix_clickfinger_clickpad_actions.patch
   * Revert upstream behavior change: enabling right button area by default
     - Too late to enable in Precise
+  * Fix erroneous tap actions on four-touch tap (LP: #963327)
+    - Add temporary patch 200_fix_four_tap.patch
 
- -- Chase Douglas <chase.douglas@ubuntu.com>  Fri, 23 Mar 2012 11:00:10 -0700
+ -- Chase Douglas <chase.douglas@ubuntu.com>  Fri, 23 Mar 2012 11:02:18 -0700
 
 xserver-xorg-input-synaptics (1.5.99.901-0ubuntu2) precise; urgency=low
 
diff --git a/debian/patches/200_fix_four_tap.patch b/debian/patches/200_fix_four_tap.patch
new file mode 100644
index 0000000..ef06691
--- /dev/null
+++ b/debian/patches/200_fix_four_tap.patch
@@ -0,0 +1,129 @@
+From 6e0268808fe6d7dfdb5beb198bf067df56452f15 Mon Sep 17 00:00:00 2001
+From: Chase Douglas <chase.douglas@canonical.com>
+Date: Fri, 23 Mar 2012 10:34:44 -0700
+Subject: [PATCH xf86-input-synaptics 1/2] Count number of multitouch touches
+ for multitouch finger count
+
+The evdev protocol only goes up to three touches for non-multitouch
+devices. If you perform a four touch tap, the finger count will only go
+up to three touches if you roll your fingers, or will always be 0 if all
+four touches land at the same time.
+
+This change ensures the correct finger count is reported.
+
+Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
+---
+I test build with HAVE_MULTITOUCH undefined to be sure it didn't break
+anything.
+
+ src/eventcomm.c |   16 ++++++++++++++--
+ 1 files changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/src/eventcomm.c b/src/eventcomm.c
+index 3721c91..b485377 100644
+--- a/src/eventcomm.c
++++ b/src/eventcomm.c
+@@ -72,6 +72,7 @@ struct eventcomm_proto_data
+     int axis_map[MT_ABS_SIZE];
+     int cur_slot;
+     ValuatorMask **last_mt_vals;
++    int num_touches;
+ #endif
+ };
+ 
+@@ -565,6 +566,7 @@ EventProcessTouchEvent(InputInfoPtr pInfo, struct SynapticsHwState *hw,
+             if (ev->value >= 0)
+             {
+                 hw->slot_state[slot_index] = SLOTSTATE_OPEN;
++                proto_data->num_touches++;
+ 
+                 if (slot_index >= 0)
+                     valuator_mask_copy(hw->mt_mask[slot_index],
+@@ -574,7 +576,10 @@ EventProcessTouchEvent(InputInfoPtr pInfo, struct SynapticsHwState *hw,
+                                 "Attempted to copy values from out-of-range "
+                                 "slot, touch events may be incorrect.\n");
+             } else
++            {
+                 hw->slot_state[slot_index] = SLOTSTATE_CLOSE;
++                proto_data->num_touches--;
++            }
+         } else
+         {
+             int map = proto_data->axis_map[ev->code - ABS_MT_TOUCH_MAJOR];
+@@ -607,10 +612,17 @@ EventProcessTouchEvent(InputInfoPtr pInfo, struct SynapticsHwState *hw,
+  * @param comm Assembled information from previous events.
+  * @return The number of fingers currently set.
+  */
+-static int count_fingers(const struct CommData *comm)
++static int count_fingers(InputInfoPtr pInfo, const struct CommData *comm)
+ {
++    SynapticsPrivate *priv = (SynapticsPrivate *)pInfo->private;
++    struct eventcomm_proto_data *proto_data = priv->proto_data;
+     int fingers = 0;
+ 
++#ifdef HAVE_MULTITOUCH
++    if (priv->has_touch)
++        return proto_data->num_touches;
++#endif
++
+     if (comm->oneFinger)
+ 	fingers = 1;
+     else if (comm->twoFingers)
+@@ -653,7 +665,7 @@ EventReadHwState(InputInfoPtr pInfo,
+ 	case EV_SYN:
+ 	    switch (ev.code) {
+ 	    case SYN_REPORT:
+-		hw->numFingers = count_fingers(comm);
++		hw->numFingers = count_fingers(pInfo, comm);
+ 		hw->millis = 1000 * ev.time.tv_sec + ev.time.tv_usec / 1000;
+ 		SynapticsCopyHwState(hwRet, hw);
+ 		return TRUE;
+-- 
+1.7.9.1
+
+From 4efb7524d12217ccbf1f777dddb7b4bb61b17196 Mon Sep 17 00:00:00 2001
+From: Chase Douglas <chase.douglas@canonical.com>
+Date: Fri, 23 Mar 2012 10:37:46 -0700
+Subject: [PATCH xf86-input-synaptics 2/2] Do not perform a tap action when
+ more than three touches
+
+Though this looks like a behavior change, it really isn't since the
+maximum tap_max_fingers that was previously possible was already handled.
+The only real change is that if a tap is recognized but the
+tap_max_fingers is zero, a tap will no longer be emitted. This shouldn't
+happen in the real world.
+
+Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
+---
+In Unity we have a four tap gesture to show/hide the dash. Without this
+fix, the dash will often appear and disappear because Unity got the four
+tap gesture and then synaptics sends a button click.
+
+ src/synaptics.c |    4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/src/synaptics.c b/src/synaptics.c
+index f07fd13..99b5085 100644
+--- a/src/synaptics.c
++++ b/src/synaptics.c
+@@ -1798,7 +1798,6 @@ SelectTapButton(SynapticsPrivate *priv, edge_type edge)
+ 
+     switch (priv->tap_max_fingers) {
+     case 1:
+-    default:
+ 	switch (edge) {
+ 	case RIGHT_TOP_EDGE:
+ 	    DBG(7, "right top edge\n");
+@@ -1830,6 +1829,9 @@ SelectTapButton(SynapticsPrivate *priv, edge_type edge)
+ 	DBG(7, "three finger tap\n");
+ 	tap = F3_TAP;
+ 	break;
++    default:
++        priv->tap_button = 0;
++        return;
+     }
+ 
+     priv->tap_button = priv->synpara.tap_action[tap];
+-- 
+1.7.9.1
+
diff --git a/debian/patches/series b/debian/patches/series
index c02f893..f24e0a4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -22,3 +22,4 @@
 130_dont_enable_rightbutton_area.patch
 
 # Temporary patches until they are merged upstream
+200_fix_four_tap.patch

commit 77998ba8ceeaba2d7b13f423e2bf6ab2f7e23c41
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Fri Mar 23 11:01:15 2012 -0700

    Revert upstream behavior change: enabling right button area by default
    
    * Revert upstream behavior change: enabling right button area by default
      - Too late to enable in Precise

diff --git a/debian/changelog b/debian/changelog
index d4889b5..8a95dfa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,8 +4,10 @@ xserver-xorg-input-synaptics (1.5.99.902-0ubuntu1) UNRELEASED; urgency=low
   * Drop patches merged upstream
     - 200_fix_clickfinger_non-clickpads.patch
     - 201_fix_clickfinger_clickpad_actions.patch
+  * Revert upstream behavior change: enabling right button area by default
+    - Too late to enable in Precise
 
- -- Chase Douglas <chase.douglas@ubuntu.com>  Fri, 23 Mar 2012 10:57:54 -0700
+ -- Chase Douglas <chase.douglas@ubuntu.com>  Fri, 23 Mar 2012 11:00:10 -0700
 
 xserver-xorg-input-synaptics (1.5.99.901-0ubuntu2) precise; urgency=low
 
diff --git a/debian/patches/130_dont_enable_rightbutton_area.patch b/debian/patches/130_dont_enable_rightbutton_area.patch
new file mode 100644
index 0000000..ff5b027
--- /dev/null
+++ b/debian/patches/130_dont_enable_rightbutton_area.patch
@@ -0,0 +1,43 @@
+From 797e51a27f48a93da9f3fb3355ca78c483029e63 Mon Sep 17 00:00:00 2001
+From: Chase Douglas <chase.douglas@canonical.com>
+Date: Fri, 23 Mar 2012 10:58:52 -0700
+Subject: [PATCH] Revert "conf: enable right-button click by default on
+ non-Apple clickpads"
+
+This is a behavior change that is inappropriate at this point in the
+Precise release cycle
+
+This reverts commit b6779458bcdb049480310ba1acb3991ad061ffc7.
+---
+ conf/50-synaptics.conf |   18 ------------------
+ 1 files changed, 0 insertions(+), 18 deletions(-)
+
+diff --git a/conf/50-synaptics.conf b/conf/50-synaptics.conf
+index 822f7a4..5ec7e78 100644
+--- a/conf/50-synaptics.conf
++++ b/conf/50-synaptics.conf
+@@ -24,21 +24,3 @@ Section "InputClass"
+         MatchDevicePath "/dev/input/mouse*"
+         Option "Ignore" "on"
+ EndSection
+-
+-# This option enables the bottom right corner to be a right button on
+-# non-synaptics clickpads.
+-# This option is only interpreted by clickpads.
+-Section "InputClass"
+-        Identifier "Default clickpad buttons"
+-        MatchDriver "synaptics"
+-        Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
+-EndSection
+-
+-# This option disables software buttons on Apple touchpads.
+-# This option is only interpreted by clickpads.
+-Section "InputClass"
+-        Identifier "Disable clickpad buttons on Apple touchpads"
+-        MatchProduct "Apple"
+-        MatchDriver "synaptics"
+-        Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"
+-EndSection
+-- 
+1.7.9.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 80fecaf..c02f893 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -19,5 +19,6 @@
 126_ubuntu_xi22.patch
 128_disable_three_click_action.patch
 129_disable_three_touch_tap.patch
+130_dont_enable_rightbutton_area.patch
 
 # Temporary patches until they are merged upstream

commit 04b14e11fbcf13be86dd475b53b432a3c9bf881c
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Fri Mar 23 11:06:35 2012 -0700

    Drop patches merged upstream
    
    * Drop patches merged upstream
      - 200_fix_clickfinger_non-clickpads.patch
      - 201_fix_clickfinger_clickpad_actions.patch

diff --git a/debian/changelog b/debian/changelog
index 32e5e84..d4889b5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,11 @@
 xserver-xorg-input-synaptics (1.5.99.902-0ubuntu1) UNRELEASED; urgency=low
 
   * New upstream release
+  * Drop patches merged upstream
+    - 200_fix_clickfinger_non-clickpads.patch
+    - 201_fix_clickfinger_clickpad_actions.patch
 
- -- Chase Douglas <chase.douglas@ubuntu.com>  Fri, 23 Mar 2012 10:56:18 -0700
+ -- Chase Douglas <chase.douglas@ubuntu.com>  Fri, 23 Mar 2012 10:57:54 -0700
 
 xserver-xorg-input-synaptics (1.5.99.901-0ubuntu2) precise; urgency=low
 
diff --git a/debian/patches/200_fix_clickfinger_non-clickpads.patch b/debian/patches/200_fix_clickfinger_non-clickpads.patch
deleted file mode 100644
index 67fbc93..0000000
--- a/debian/patches/200_fix_clickfinger_non-clickpads.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 6b76e659ff3c18f6120e17ab77bcbd37bb518724 Mon Sep 17 00:00:00 2001
-From: Chase Douglas <chase.douglas@canonical.com>
-Date: Wed, 21 Mar 2012 12:50:46 -0700
-Subject: [PATCH 1/2] Fix clickfinger actions when middle button emulation is
- enabled
-
-When MBE is enabled, a physical left button press is delayed until a
-timeout is reached. This results in the logical left button being
-depressed while the physical left button is pressed. The physical state
-is stored as the "old" hw state, and it is used for detecting a
-transition from depressed to pressed for clickfinger actions. Since the
-"old" hw state shows the left button pressed, but the current logical
-state shows the left button unpressed, when the MBE timeout fires and we
-set the logical left button pressed the transition check fails.
-
-Since the "old" hw state is only used for clickfinger left button press
-transitions, redefining it to hold the previous logical hw state is
-sufficient for fixing the bug and should not cause any regressions.
-
-Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
----
- src/synaptics.c    |    5 ++++-
- src/synapticsstr.h |    2 +-
- 2 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/src/synaptics.c b/src/synaptics.c
-index 489eeaa..9f214e5 100644
---- a/src/synaptics.c
-+++ b/src/synaptics.c
-@@ -1611,7 +1611,6 @@ ReadInput(InputInfoPtr pInfo)
- 
- 	SynapticsCopyHwState(priv->hwState, hw);
- 	delay = HandleState(pInfo, hw, hw->millis, FALSE);
--	SynapticsCopyHwState(priv->old_hw_state, priv->hwState);
- 	newDelay = TRUE;
-     }
- 
-@@ -3236,6 +3235,10 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now,
-     /* generate a history of the absolute positions */
-     if (inside_active_area)
- 	store_history(priv, hw->x, hw->y, hw->millis);
-+
-+    /* Save logical state for transition comparisons */
-+    SynapticsCopyHwState(priv->old_hw_state, hw);
-+
-     return delay;
- }
- 
-diff --git a/src/synapticsstr.h b/src/synapticsstr.h
-index fcefc46..55aab3d 100644
---- a/src/synapticsstr.h
-+++ b/src/synapticsstr.h
-@@ -196,7 +196,7 @@ struct _SynapticsPrivateRec
-     void *proto_data;			/* protocol-specific data */
- 
-     struct SynapticsHwState *hwState;
--    struct SynapticsHwState *old_hw_state; /* previous hw state */
-+    struct SynapticsHwState *old_hw_state; /* previous logical hw state */
- 
-     const char *device;			/* device node */
-     Bool shm_config;			/* True when shared memory area allocated */
--- 
-1.7.9.1
-
-From 6b4561955b745c634df3dfef3e27a614beb64528 Mon Sep 17 00:00:00 2001
-From: Chase Douglas <chase.douglas@canonical.com>
-Date: Wed, 21 Mar 2012 12:52:00 -0700
-Subject: [PATCH 2/2] Fix clickfinger actions when buttons other than 1 are
- reported
-
-The "old" logical state now holds the clickfinger action button. In
-order to check for proper clickpad press transition, we need to check if
-any of the left, middle, and right logical button states are pressed.
-
-Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
----
- src/synaptics.c |    3 ++-
- 1 files changed, 2 insertions(+), 1 deletions(-)
-
-diff --git a/src/synaptics.c b/src/synaptics.c
-index 9f214e5..e22929b 100644
---- a/src/synaptics.c
-+++ b/src/synaptics.c
-@@ -2779,7 +2779,8 @@ update_hw_button_state(const InputInfoPtr pInfo, struct SynapticsHwState *hw,
-     /* Fingers emulate other buttons. ClickFinger can only be
-        triggered on transition, when left is pressed
-      */
--    if(hw->left && !old->left && hw->numFingers >= 1) {
-+    if(hw->left && !old->left && !old->middle && !old->right &&
-+       hw->numFingers >= 1) {
-         handle_clickfinger(priv, hw);
-     }
- 
--- 
-1.7.9.1
-
diff --git a/debian/patches/201_fix_clickfinger_clickpad_actions.patch b/debian/patches/201_fix_clickfinger_clickpad_actions.patch
deleted file mode 100644
index 0d82a93..0000000
--- a/debian/patches/201_fix_clickfinger_clickpad_actions.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From 5201038f7d4a58f78d9bcbf340fb4a50958c6ab0 Mon Sep 17 00:00:00 2001
-From: Chase Douglas <chase.douglas@canonical.com>
-Date: Wed, 21 Mar 2012 12:43:58 -0700
-Subject: [PATCH 1/2] Keep track of which touch slots are open
-
-This change adds a new touch slot state that denotes when the slot is
-open but does not have any new data to report.
-
-Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
----
- src/eventcomm.c |    3 ++-
- src/synproto.c  |   13 ++++++++++++-
- src/synproto.h  |    1 +
- 3 files changed, 15 insertions(+), 2 deletions(-)
-
-diff --git a/src/eventcomm.c b/src/eventcomm.c
-index f199c24..3721c91 100644
---- a/src/eventcomm.c
-+++ b/src/eventcomm.c
-@@ -557,7 +557,8 @@ EventProcessTouchEvent(InputInfoPtr pInfo, struct SynapticsHwState *hw,
-     {
-         int slot_index = last_mt_vals_slot(priv);
- 
--        if (hw->slot_state[slot_index] == SLOTSTATE_EMPTY)
-+        if (hw->slot_state[slot_index] == SLOTSTATE_EMPTY ||
-+            hw->slot_state[slot_index] == SLOTSTATE_OPEN_EMPTY)
-             hw->slot_state[slot_index] = SLOTSTATE_UPDATE;
-         if (ev->code == ABS_MT_TRACKING_ID)
-         {
-diff --git a/src/synproto.c b/src/synproto.c
-index bdf2d21..19a13e5 100644
---- a/src/synproto.c
-+++ b/src/synproto.c
-@@ -152,7 +152,18 @@ SynapticsResetTouchHwState(struct SynapticsHwState *hw)
-         for (j = 2; j < valuator_mask_num_valuators(hw->mt_mask[i]); j++)
-             valuator_mask_unset(hw->mt_mask[i], j);
- 
--        hw->slot_state[i] = SLOTSTATE_EMPTY;
-+        switch (hw->slot_state[i])
-+        {
-+            case SLOTSTATE_OPEN:
-+            case SLOTSTATE_OPEN_EMPTY:
-+            case SLOTSTATE_UPDATE:
-+                hw->slot_state[i] = SLOTSTATE_OPEN_EMPTY;
-+                break;
-+
-+            default:
-+                hw->slot_state[i] = SLOTSTATE_EMPTY;
-+                break;
-+        }
-     }
- #endif
- }
-diff --git a/src/synproto.h b/src/synproto.h
-index 95ebc92..e16aeb0 100644
---- a/src/synproto.h
-+++ b/src/synproto.h
-@@ -42,6 +42,7 @@ enum SynapticsSlotState
-     SLOTSTATE_EMPTY = 0,
-     SLOTSTATE_OPEN,
-     SLOTSTATE_CLOSE,
-+    SLOTSTATE_OPEN_EMPTY,
-     SLOTSTATE_UPDATE,
- };
- 
--- 
-1.7.9.1
-
-From c229afff677daef0e5960cf334b29f1a0af38fcf Mon Sep 17 00:00:00 2001
-From: Chase Douglas <chase.douglas@canonical.com>
-Date: Wed, 21 Mar 2012 12:45:09 -0700
-Subject: [PATCH 2/2] Include open but unchanged touches when guessing
- clickfingers
-
-On a clickpad, when the button is pressed the clickfinger guessing will
-only work properly if all touches have new data to report. If a touch
-has not changed, then it will not be counted. This leads to inaccurate
-finger counts.
-
-This change ensures that all active touches are counted. Note that the X
-and Y valuators of active but unchanged touches are still valid.
-
-Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
----
- src/synaptics.c |    7 ++++---
- 1 files changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/src/synaptics.c b/src/synaptics.c
-index e22929b..3c5b12d 100644
---- a/src/synaptics.c
-+++ b/src/synaptics.c
-@@ -2600,8 +2600,8 @@ clickpad_guess_clickfingers(SynapticsPrivate *priv, struct SynapticsHwState *hw)
-     for (i = 0; i < hw->num_mt_mask - 1; i++) {
-         ValuatorMask *f1;
- 
--        /* you can't click on open, you're not fast enough */
--        if (hw->slot_state[i] != SLOTSTATE_UPDATE)
-+        if (hw->slot_state[i] == SLOTSTATE_EMPTY ||
-+            hw->slot_state[i] == SLOTSTATE_CLOSE)
-             continue;
- 
-         f1 = hw->mt_mask[i];
-@@ -2610,7 +2610,8 @@ clickpad_guess_clickfingers(SynapticsPrivate *priv, struct SynapticsHwState *hw)
-             ValuatorMask *f2;
-             double x1, x2, y1, y2;
- 
--            if (hw->slot_state[j] != SLOTSTATE_UPDATE)
-+            if (hw->slot_state[j] == SLOTSTATE_EMPTY ||
-+                hw->slot_state[j] == SLOTSTATE_CLOSE)
-                 continue;
- 
-             f2 = hw->mt_mask[j];
--- 
-1.7.9.1
-
diff --git a/debian/patches/series b/debian/patches/series
index 52a4421..80fecaf 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -21,5 +21,3 @@
 129_disable_three_touch_tap.patch
 
 # Temporary patches until they are merged upstream
-200_fix_clickfinger_non-clickpads.patch
-201_fix_clickfinger_clickpad_actions.patch

commit 792b0a7afdea0f23b01af1e30a38b8fc3f2691fd
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Fri Mar 23 10:57:26 2012 -0700

    New upstream release

diff --git a/ChangeLog b/ChangeLog
index 97481b0..f1f270d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,122 @@
+commit 4a80c0dc38ea4dafcb112191c2dd7e0082193263
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Mar 23 10:38:20 2012 +1000
+
+    synaptics 1.5.99.902
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit b6779458bcdb049480310ba1acb3991ad061ffc7
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Mar 22 15:15:47 2012 +1000
+
+    conf: enable right-button click by default on non-Apple clickpads
+    
+    The right-half of the bottom 18% of the touchpad are enabled as right button
+    by default. On Apple touchpads (these don't have marking for the right
+    button) disable them by default.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit c9cf8827b129a553ad3cd3d7ee6f463a6e94227d
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Mar 22 15:20:45 2012 +1000
+
+    use xf86SetStrOption for SoftButtonAreas
+    
+    This way the option is reported in the log when parsed.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit cea97dd5e09b165c2a4b2bbbb5741a03f152ed37
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Mar 14 16:47:26 2012 +1000
+
+    Allow soft button areas to be specified in % of the touchpad
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
+
+commit b3348eb7e4e2187e11aa3c1cec2a58512759e6aa
+Author: Chase Douglas <chase.douglas@canonical.com>
+Date:   Wed Mar 21 12:58:30 2012 -0700
+
+    Include open but unchanged touches when guessing clickfingers
+    
+    On a clickpad, when the button is pressed the clickfinger guessing will
+    only work properly if all touches have new data to report. If a touch
+    has not changed, then it will not be counted. This leads to inaccurate
+    finger counts.
+    
+    This change ensures that all active touches are counted. Note that the X
+    and Y valuators of active but unchanged touches are still valid.
+    
+    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit eba82d203e5e817a61180c6510d8de0d063ed05d
+Author: Chase Douglas <chase.douglas@canonical.com>
+Date:   Wed Mar 21 12:58:29 2012 -0700
+
+    Keep track of which touch slots are open
+    
+    This change adds a new touch slot state that denotes when the slot is
+    open but does not have any new data to report.
+    
+    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 73ec252b6f2d25cc49557b1d3789b459b60b8d4e
+Author: Chase Douglas <chase.douglas@canonical.com>
+Date:   Wed Mar 21 12:58:28 2012 -0700
+
+    Fix clickfinger actions when buttons other than 1 are reported
+    
+    The "old" logical state now holds the clickfinger action button. In
+    order to check for proper clickpad press transition, we need to check if
+    any of the left, middle, and right logical button states are pressed.
+    
+    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 93c72117e169624854f6eb63591702d7e4dae97c
+Author: Chase Douglas <chase.douglas@canonical.com>
+Date:   Wed Mar 21 12:58:27 2012 -0700
+
+    Fix clickfinger actions when middle button emulation is enabled
+    
+    When MBE is enabled, a physical left button press is delayed until a
+    timeout is reached. This results in the logical left button being
+    depressed while the physical left button is pressed. The physical state
+    is stored as the "old" hw state, and it is used for detecting a
+    transition from depressed to pressed for clickfinger actions. Since the
+    "old" hw state shows the left button pressed, but the current logical
+    state shows the left button unpressed, when the MBE timeout fires and we
+    set the logical left button pressed the transition check fails.
+    
+    Since the "old" hw state is only used for clickfinger left button press
+    transitions, redefining it to hold the previous logical hw state is
+    sufficient for fixing the bug and should not cause any regressions.
+    
+    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 5cde789fcafaed47c2533c4315e5c7d5548605f5
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Mar 14 13:24:32 2012 +1000
+
+    Fix inverted circular scrolling direction
+    
+    Introduced in 26831a6eeac6762ad4d99532f62ebbab0827de10.
+    In said commit, the old-style button events were changed to delta
+    accumulation. Alas, for circular scrolling, a positive delta is up whereas
+    for everything else a positive delta is down.
+    
+    Reported-by: Thomas Bächler <thomas@archlinux.org>
+    Tested-by: Thomas Bächler <thomas@archlinux.org>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
+
 commit dd650a064b98b1c325a38e1370cc11059c257b07
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Wed Mar 14 08:56:45 2012 +1000
diff --git a/debian/changelog b/debian/changelog
index c8d3d6e..32e5e84 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-input-synaptics (1.5.99.902-0ubuntu1) UNRELEASED; urgency=low
+
+  * New upstream release
+
+ -- Chase Douglas <chase.douglas@ubuntu.com>  Fri, 23 Mar 2012 10:56:18 -0700
+
 xserver-xorg-input-synaptics (1.5.99.901-0ubuntu2) precise; urgency=low
 
   * Disable three touch tap in favor of uTouch gestures (LP: #961725)

commit 4a80c0dc38ea4dafcb112191c2dd7e0082193263
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Mar 23 10:38:20 2012 +1000

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

diff --git a/configure.ac b/configure.ac
index af1bc2a..0a85d13 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.901],
+        [1.5.99.902],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-input-synaptics])
 AC_CONFIG_SRCDIR([Makefile.am])

commit b6779458bcdb049480310ba1acb3991ad061ffc7
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Mar 22 15:15:47 2012 +1000

    conf: enable right-button click by default on non-Apple clickpads
    
    The right-half of the bottom 18% of the touchpad are enabled as right button
    by default. On Apple touchpads (these don't have marking for the right
    button) disable them by default.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/conf/50-synaptics.conf b/conf/50-synaptics.conf
index 5ec7e78..822f7a4 100644
--- a/conf/50-synaptics.conf
+++ b/conf/50-synaptics.conf
@@ -24,3 +24,21 @@ Section "InputClass"
         MatchDevicePath "/dev/input/mouse*"
         Option "Ignore" "on"
 EndSection
+
+# This option enables the bottom right corner to be a right button on
+# non-synaptics clickpads.
+# This option is only interpreted by clickpads.
+Section "InputClass"
+        Identifier "Default clickpad buttons"
+        MatchDriver "synaptics"
+        Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
+EndSection
+
+# This option disables software buttons on Apple touchpads.
+# This option is only interpreted by clickpads.
+Section "InputClass"
+        Identifier "Disable clickpad buttons on Apple touchpads"
+        MatchProduct "Apple"
+        MatchDriver "synaptics"
+        Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"
+EndSection

commit c9cf8827b129a553ad3cd3d7ee6f463a6e94227d
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Mar 22 15:20:45 2012 +1000

    use xf86SetStrOption for SoftButtonAreas
    
    This way the option is reported in the log when parsed.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/synaptics.c b/src/synaptics.c
index 789de81..f07fd13 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -521,7 +521,7 @@ static void set_softbutton_areas_option(InputInfoPtr pInfo)
     if (!pars->clickpad)
         return;
 
-    option_string = xf86CheckStrOption(pInfo->options, "SoftButtonAreas", NULL);
+    option_string = xf86SetStrOption(pInfo->options, "SoftButtonAreas", NULL);
     if (!option_string)
         return;
 

commit cea97dd5e09b165c2a4b2bbbb5741a03f152ed37
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Mar 14 16:47:26 2012 +1000

    Allow soft button areas to be specified in % of the touchpad
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>

diff --git a/man/synaptics.man b/man/synaptics.man
index 23862e3..864a95f 100644
--- a/man/synaptics.man
+++ b/man/synaptics.man
@@ -526,6 +526,8 @@ parameters define the area of the right button, and the second four parameters
 define the area of the middle button. The areas are defined by the left, right,
 top, and bottom edges as sequential values of the property. If any edge is set
 to 0, the button is assumed to extend to infinity in the given direction.
+Any of the values may be given as percentage of the touchpad width or
+height, whichever applies.
 .
 When the user performs a click within the defined soft button areas, the right
 or middle click action is performed.
diff --git a/src/synaptics.c b/src/synaptics.c
index 3c5b12d..789de81 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -511,10 +511,12 @@ static void set_softbutton_areas_option(InputInfoPtr pInfo)
     SynapticsPrivate *priv = pInfo->private;
     SynapticsParameters *pars = &priv->synpara;
     int values[8];
+    int in_percent = 0; /* bitmask for which ones are in % */
     char *option_string;
     char *next_num;
     char *end_str;
     int i;
+    int width, height;
 
     if (!pars->clickpad)
         return;
@@ -534,12 +536,36 @@ static void set_softbutton_areas_option(InputInfoPtr pInfo)
         values[i] = value;
 
         if (next_num != end_str)
+        {
+            if (end_str && *end_str == '%')
+            {
+                in_percent |= 1 << i;
+                end_str++;
+            }
             next_num = end_str;
-        else
+        } else
             goto fail;
     }
 
-    if (i < 8 || *next_num != '\0' || !SynapticsIsSoftButtonAreasValid(values))
+    if (i < 8 || *next_num != '\0')
+        goto fail;
+
+    width = priv->maxx - priv->minx;
+    height = priv->maxy - priv->miny;
+
+    for (i = 0; in_percent && i < 8; i++)
+    {
+        int base, size;
+
+        if ((in_percent & (1 << i)) == 0 || values[i] == 0)
+            continue;
+
+        size = ((i % 4) < 2) ? width : height;
+        base = ((i % 4) < 2) ? priv->minx : priv->miny;
+        values[i] = base + size * values[i]/100.0;
+    }
+
+    if (!SynapticsIsSoftButtonAreasValid(values))
         goto fail;
 
     memcpy(pars->softbutton_areas[0], values, 4 * sizeof(int));

commit b3348eb7e4e2187e11aa3c1cec2a58512759e6aa
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Wed Mar 21 12:58:30 2012 -0700

    Include open but unchanged touches when guessing clickfingers
    
    On a clickpad, when the button is pressed the clickfinger guessing will
    only work properly if all touches have new data to report. If a touch
    has not changed, then it will not be counted. This leads to inaccurate
    finger counts.
    
    This change ensures that all active touches are counted. Note that the X
    and Y valuators of active but unchanged touches are still valid.
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/synaptics.c b/src/synaptics.c
index e22929b..3c5b12d 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -2600,8 +2600,8 @@ clickpad_guess_clickfingers(SynapticsPrivate *priv, struct SynapticsHwState *hw)
     for (i = 0; i < hw->num_mt_mask - 1; i++) {
         ValuatorMask *f1;
 
-        /* you can't click on open, you're not fast enough */
-        if (hw->slot_state[i] != SLOTSTATE_UPDATE)
+        if (hw->slot_state[i] == SLOTSTATE_EMPTY ||
+            hw->slot_state[i] == SLOTSTATE_CLOSE)
             continue;
 
         f1 = hw->mt_mask[i];
@@ -2610,7 +2610,8 @@ clickpad_guess_clickfingers(SynapticsPrivate *priv, struct SynapticsHwState *hw)
             ValuatorMask *f2;
             double x1, x2, y1, y2;
 
-            if (hw->slot_state[j] != SLOTSTATE_UPDATE)
+            if (hw->slot_state[j] == SLOTSTATE_EMPTY ||
+                hw->slot_state[j] == SLOTSTATE_CLOSE)
                 continue;
 
             f2 = hw->mt_mask[j];

commit eba82d203e5e817a61180c6510d8de0d063ed05d
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Wed Mar 21 12:58:29 2012 -0700

    Keep track of which touch slots are open
    
    This change adds a new touch slot state that denotes when the slot is
    open but does not have any new data to report.
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/eventcomm.c b/src/eventcomm.c
index f199c24..3721c91 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -557,7 +557,8 @@ EventProcessTouchEvent(InputInfoPtr pInfo, struct SynapticsHwState *hw,
     {
         int slot_index = last_mt_vals_slot(priv);
 
-        if (hw->slot_state[slot_index] == SLOTSTATE_EMPTY)
+        if (hw->slot_state[slot_index] == SLOTSTATE_EMPTY ||
+            hw->slot_state[slot_index] == SLOTSTATE_OPEN_EMPTY)
             hw->slot_state[slot_index] = SLOTSTATE_UPDATE;
         if (ev->code == ABS_MT_TRACKING_ID)
         {
diff --git a/src/synproto.c b/src/synproto.c
index bdf2d21..19a13e5 100644
--- a/src/synproto.c
+++ b/src/synproto.c
@@ -152,7 +152,18 @@ SynapticsResetTouchHwState(struct SynapticsHwState *hw)
         for (j = 2; j < valuator_mask_num_valuators(hw->mt_mask[i]); j++)
             valuator_mask_unset(hw->mt_mask[i], j);
 
-        hw->slot_state[i] = SLOTSTATE_EMPTY;
+        switch (hw->slot_state[i])
+        {
+            case SLOTSTATE_OPEN:
+            case SLOTSTATE_OPEN_EMPTY:
+            case SLOTSTATE_UPDATE:
+                hw->slot_state[i] = SLOTSTATE_OPEN_EMPTY;
+                break;
+
+            default:
+                hw->slot_state[i] = SLOTSTATE_EMPTY;
+                break;
+        }
     }
 #endif
 }
diff --git a/src/synproto.h b/src/synproto.h
index 95ebc92..e16aeb0 100644
--- a/src/synproto.h
+++ b/src/synproto.h
@@ -42,6 +42,7 @@ enum SynapticsSlotState
     SLOTSTATE_EMPTY = 0,
     SLOTSTATE_OPEN,
     SLOTSTATE_CLOSE,
+    SLOTSTATE_OPEN_EMPTY,
     SLOTSTATE_UPDATE,
 };
 

commit 73ec252b6f2d25cc49557b1d3789b459b60b8d4e
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Wed Mar 21 12:58:28 2012 -0700

    Fix clickfinger actions when buttons other than 1 are reported
    
    The "old" logical state now holds the clickfinger action button. In
    order to check for proper clickpad press transition, we need to check if
    any of the left, middle, and right logical button states are pressed.
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/synaptics.c b/src/synaptics.c
index 9f214e5..e22929b 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -2779,7 +2779,8 @@ update_hw_button_state(const InputInfoPtr pInfo, struct SynapticsHwState *hw,
     /* Fingers emulate other buttons. ClickFinger can only be
        triggered on transition, when left is pressed
      */
-    if(hw->left && !old->left && hw->numFingers >= 1) {
+    if(hw->left && !old->left && !old->middle && !old->right &&
+       hw->numFingers >= 1) {
         handle_clickfinger(priv, hw);
     }
 

commit 93c72117e169624854f6eb63591702d7e4dae97c
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Wed Mar 21 12:58:27 2012 -0700

    Fix clickfinger actions when middle button emulation is enabled
    
    When MBE is enabled, a physical left button press is delayed until a
    timeout is reached. This results in the logical left button being
    depressed while the physical left button is pressed. The physical state
    is stored as the "old" hw state, and it is used for detecting a
    transition from depressed to pressed for clickfinger actions. Since the
    "old" hw state shows the left button pressed, but the current logical
    state shows the left button unpressed, when the MBE timeout fires and we
    set the logical left button pressed the transition check fails.
    
    Since the "old" hw state is only used for clickfinger left button press
    transitions, redefining it to hold the previous logical hw state is
    sufficient for fixing the bug and should not cause any regressions.
    


Reply to: