diff options
author | Peter Osterlund <petero2@telia.com> | 2005-01-05 15:27:25 +0100 |
---|---|---|
committer | Peter Osterlund <petero2@telia.com> | 2006-04-09 04:03:02 +0200 |
commit | fa1793bd9e03db888089319c269557d671ac2fce (patch) | |
tree | 6f12734feb2692551efaedbaef712209d7d3d512 | |
parent | 9f1a9f7cf89724f0803106eaf4168bbb72d3b558 (diff) |
Rearranged code in HandleScrolling() to make it slightly
more logical.
-rw-r--r-- | synaptics.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/synaptics.c b/synaptics.c index c1f0d6c..b2f89cf 100644 --- a/synaptics.c +++ b/synaptics.c @@ -1334,6 +1334,17 @@ HandleScrolling(SynapticsPrivate *priv, struct SynapticsHwState *hw, priv->scroll_y -= para->scroll_dist_vert; } } + if (priv->horiz_scroll_on) { + /* + = right, - = left */ + while (hw->x - priv->scroll_x > para->scroll_dist_horiz) { + sd->right++; + priv->scroll_x += para->scroll_dist_horiz; + } + while (hw->x - priv->scroll_x < -para->scroll_dist_horiz) { + sd->left++; + priv->scroll_x -= para->scroll_dist_horiz; + } + } if (priv->circ_scroll_on) { /* + = counter clockwise, - = clockwise */ while (diffa(priv->scroll_a, angle(priv, hw->x, hw->y)) > para->scroll_dist_circ) { @@ -1355,17 +1366,6 @@ HandleScrolling(SynapticsPrivate *priv, struct SynapticsHwState *hw, priv->scroll_a += 2 * M_PI; } } - if (priv->horiz_scroll_on) { - /* + = right, - = left */ - while (hw->x - priv->scroll_x > para->scroll_dist_horiz) { - sd->right++; - priv->scroll_x += para->scroll_dist_horiz; - } - while (hw->x - priv->scroll_x < -para->scroll_dist_horiz) { - sd->left++; - priv->scroll_x -= para->scroll_dist_horiz; - } - } } /* |