Made it possible to have both circular scrolling and

vertical/horizontal scrolling enabled at the same time. From Matthias
Ihmig <m.ihmig@gmx.net>.
This commit is contained in:
Peter Osterlund
2004-02-29 22:33:57 +01:00
parent 362c0722dd
commit eeb40cac2b
2 changed files with 18 additions and 2 deletions

5
README
View File

@@ -166,7 +166,10 @@ corner. Once scrolling is engaged, moving your finger in clockwise
circles around the trackpad will generate scroll down events and
counter clockwise scroll up events. Lifting your finger will disengage
circular scrolling. Use tight circles near the center of the pad for
fast scrolling and large circles for better control.
fast scrolling and large circles for better control. When used
together with vertical scrolling, hitting the upper or lower right
corner will seamlessly switch over from vertical to circular
scrolling.
FAQ

View File

@@ -1063,7 +1063,8 @@ HandleState(LocalDevicePtr local, struct SynapticsHwState* hw)
priv->scroll_a = angle(priv, hw->x, hw->y);
DBG(7, ErrorF("circular scroll detected on edge\n"));
}
} else {
}
if (!priv->circ_scroll_on) {
if ((para->scroll_dist_vert != 0) && (edge & RIGHT_EDGE)) {
priv->vert_scroll_on = TRUE;
priv->scroll_y = hw->y;
@@ -1091,6 +1092,18 @@ HandleState(LocalDevicePtr local, struct SynapticsHwState* hw)
}
/* scroll processing */
/* if hitting a corner (top right or bottom right) while vertical scrolling is active,
switch over to circular scrolling smoothly */
if (priv->vert_scroll_on && !priv->horiz_scroll_on && para->circular_scrolling) {
if ((edge & RIGHT_EDGE) && (edge & (TOP_EDGE | BOTTOM_EDGE))) {
priv->vert_scroll_on = FALSE;
priv->circ_scroll_on = TRUE;
priv->scroll_a = angle(priv, hw->x, hw->y);
DBG(7, ErrorF("switching to circular scrolling\n"));
}
}
scroll_up = 0;
scroll_down = 0;
if (priv->vert_scroll_on) {