diff options
author | Florian Loitsch <synaptics@florian.loitsch.com> | 2007-05-17 12:31:58 +0200 |
---|---|---|
committer | Peter Osterlund <petero2@telia.com> | 2007-05-17 12:31:58 +0200 |
commit | 2d06ab1d2b3170b6fa44b945376b2ad4cd682af9 (patch) | |
tree | 4388fcd2cf42cab4a5e298c9ee30f6d001b8ace4 /synaptics.c | |
parent | 88211ca60be7cc74015ad4158722e5950884bd78 (diff) |
Allow to easily switch between move and scroll.
To observe the behavior: move with 1 finger. During movement add a 2nd
finger. If the touchpad supports it then the driver switches
seamlessly to scroll mode. Worked on the Macbook touchpad, but failed
on some Dell touchpad.
Diffstat (limited to 'synaptics.c')
-rw-r--r-- | synaptics.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/synaptics.c b/synaptics.c index 90d7e0d..6b0236a 100644 --- a/synaptics.c +++ b/synaptics.c @@ -1499,19 +1499,27 @@ HandleScrolling(SynapticsPrivate *priv, struct SynapticsHwState *hw, DBG(7, ErrorF("circular scroll detected on edge\n")); } } - if (!priv->circ_scroll_on) { + } + if (!priv->circ_scroll_on) { + if (finger) { if (hw->numFingers == 2) { - if ((para->scroll_twofinger_vert) && (para->scroll_dist_vert != 0)) { + if (!priv->vert_scroll_twofinger_on && + (para->scroll_twofinger_vert) && (para->scroll_dist_vert != 0)) { priv->vert_scroll_twofinger_on = TRUE; + priv->vert_scroll_edge_on = FALSE; priv->scroll_y = hw->y; DBG(7, ErrorF("vert two-finger scroll detected\n")); } - if ((para->scroll_twofinger_horiz) && (para->scroll_dist_horiz != 0)) { + if (!priv->horiz_scroll_twofinger_on && + (para->scroll_twofinger_horiz) && (para->scroll_dist_horiz != 0)) { priv->horiz_scroll_twofinger_on = TRUE; + priv->horiz_scroll_edge_on = FALSE; priv->scroll_x = hw->x; DBG(7, ErrorF("horiz two-finger scroll detected\n")); } } + } + if (finger && !priv->finger_state) { if (!priv->vert_scroll_twofinger_on && !priv->horiz_scroll_twofinger_on) { if ((para->scroll_edge_vert) && (para->scroll_dist_vert != 0) && (edge & RIGHT_EDGE)) { |