[PATCH 13/18] Enable pinch gesture as default

Takashi Iwai tiwai at suse.de
Fri Oct 8 10:22:37 PDT 2010


Signed-off-by: Takashi Iwai <tiwai at suse.de>
---
 src/synaptics.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/synaptics.c b/src/synaptics.c
index 902db53..5ec853a 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -435,6 +435,7 @@ static void set_default_parameters(InputInfoPtr pInfo)
     Bool vertTwoFingerScroll, horizTwoFingerScroll;
     int horizResolution = 1;
     int vertResolution = 1;
+    int pinchStart, pinchDelta;
     int width, height, diag, range;
 
     /* read the parameters */
@@ -466,6 +467,13 @@ static void set_default_parameters(InputInfoPtr pInfo)
     edgeMotionMinSpeed = 1;
     edgeMotionMaxSpeed = diag * .080;
     accelFactor = 200.0 / diag; /* trial-and-error */
+    if (priv->can_multi_touch) {
+        pinchStart = 0;
+        pinchDelta = 0;
+    } else {
+	pinchStart = diag * 0.1;
+	pinchDelta = diag * 0.375;
+    }
 
     priv->move_ptr_threshold = width / 5;
 
@@ -598,8 +606,8 @@ static void set_default_parameters(InputInfoPtr pInfo)
     pars->touch_button_area = xf86SetIntOption(opts, "TouchButtonArea", 20);
     pars->touch_button_sticky = xf86SetIntOption(opts, "TouchButtonSticky", 64);
     pars->led_double_tap = xf86SetBoolOption(opts, "LEDDoubleTap", TRUE);
-    pars->multi_touch_pinch_start = xf86SetIntOption(opts, "MultiTouchPinchStart", 0);
-    pars->multi_touch_pinch_dist = xf86SetIntOption(opts, "MultiTouchPinchDelta", 0);
+    pars->multi_touch_pinch_start = xf86SetIntOption(opts, "MultiTouchPinchStart", pinchStart);
+    pars->multi_touch_pinch_dist = xf86SetIntOption(opts, "MultiTouchPinchDelta", pinchDelta);
 
     /* Warn about (and fix) incorrectly configured TopEdge/BottomEdge parameters */
     if (pars->top_edge > pars->bottom_edge) {
-- 
1.7.3.1



More information about the xorg-devel mailing list