[synaptics] Allow dead areas to update the button state

Submitted by Peter Hutterer on Dec. 21, 2012, 1:06 a.m.

Details

Message ID 20121221010612.GA26814@yabbi.bne.redhat.com
State Accepted
Commit a5ac54f60af96b9b862425ccd8b6c7afaa4937e4
Headers show

Not browsing as part of any series.

Commit Message

Peter Hutterer Dec. 21, 2012, 1:06 a.m.
On clickpads, a dead area helps prevent pointer movement when the buttons
are pressed. Thus check for the button state before resetting the hw state
in case we get a right-click in the soft button area.

For clickfinger, the effect is that clickfinger events are now triggered if
the finger rests in the dead area.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
 src/synaptics.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/synaptics.c b/src/synaptics.c
index 0472197..29e551a 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -2795,6 +2795,9 @@  HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now,
 
     inside_active_area = is_inside_active_area(priv, hw->x, hw->y);
 
+    /* these two just update hw->left, right, etc. */
+    update_hw_button_state(pInfo, hw, priv->old_hw_state, now, &delay);
+
     /* now we know that these _coordinates_ aren't in the area.
        invalid are: x, y, z, numFingers, fingerWidth
        valid are: millis, left/right/middle/up/down/etc.
@@ -2806,9 +2809,6 @@  HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now,
          * really release, the finger should remain down. */
     }
 
-    /* these two just update hw->left, right, etc. */
-    update_hw_button_state(pInfo, hw, priv->old_hw_state, now, &delay);
-
     /* no edge or finger detection outside of area */
     if (inside_active_area) {
         edge = edge_detection(priv, hw->x, hw->y);