diff options
Diffstat (limited to '14393-gestures-only.patch')
-rw-r--r-- | 14393-gestures-only.patch | 106 |
1 files changed, 67 insertions, 39 deletions
diff --git a/14393-gestures-only.patch b/14393-gestures-only.patch index 7b2e35230d25..8a9bcf85c2cb 100644 --- a/14393-gestures-only.patch +++ b/14393-gestures-only.patch @@ -1,8 +1,47 @@ +diff --git a/conf/50-synaptics.conf b/conf/50-synaptics.conf +index aa50456..6c9c7d7 100644 +--- a/conf/50-synaptics.conf ++++ b/conf/50-synaptics.conf +@@ -15,6 +15,34 @@ Section "InputClass" + # enabled by default. See the following link for details: + # http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html + # MatchDevicePath "/dev/input/event*" ++ ++# Uncomment as desired: ++# Option "TapButton1" "1" ++# Option "TapButton2" "3" ++# Option "TapButton3" "2" ++# Option "VertEdgeScroll" "on" ++# Option "VertTwoFingerScroll" "on" ++# Option "HorizEdgeScroll" "on" ++# Option "HorizTwoFingerScroll" "on" ++# Option "CircularScrolling" "on" ++# Option "CircScrollTrigger" "2" ++# Option "EmulateTwoFingerMinZ" "40" ++# Option "EmulateTwoFingerMinW" "8" ++# Option "CoastingSpeed" "0" ++ ++# Uncomment as desired: ++# Option "TapButton1" "1" ++# Option "TapButton2" "3" ++# Option "TapButton3" "2" ++# Option "VertEdgeScroll" "on" ++# Option "VertTwoFingerScroll" "on" ++# Option "HorizEdgeScroll" "on" ++# Option "HorizTwoFingerScroll" "on" ++# Option "CircularScrolling" "on" ++# Option "CircScrollTrigger" "2" ++# Option "EmulateTwoFingerMinZ" "40" ++# Option "EmulateTwoFingerMinW" "8" ++# Option "CoastingSpeed" "0" + EndSection + + Section "InputClass" diff --git a/include/synaptics-properties.h b/include/synaptics-properties.h -index b717880..22a12cd 100644 +index 32ab2e1..91d8160 100644 --- a/include/synaptics-properties.h +++ b/include/synaptics-properties.h -@@ -152,4 +152,7 @@ +@@ -158,4 +158,7 @@ /* 32 Bit Integer, 2 values, horizontal hysteresis, vertical hysteresis */ #define SYNAPTICS_PROP_NOISE_CANCELLATION "Synaptics Noise Cancellation" @@ -11,12 +50,12 @@ index b717880..22a12cd 100644 + #endif /* _SYNAPTICS_PROPERTIES_H_ */ diff --git a/man/synaptics.man b/man/synaptics.man -index 079a5f8..836bf69 100644 +index 76756be..71ef3ea 100644 --- a/man/synaptics.man +++ b/man/synaptics.man -@@ -447,6 +447,14 @@ soft button areas. Button areas may not overlap, however it is permitted for two - buttons to share an edge value. - Property: "Synaptics Soft Button Areas" +@@ -518,6 +518,15 @@ initialized if + .B Option \*qHasSecondarySoftButtons\*q + is enabled and this option is set in the __xconfigfile__(__filemansuffix__). . +.TP +.BI "Option \*qGesturesOnly\*q \*q" boolean \*q @@ -26,10 +65,11 @@ index 079a5f8..836bf69 100644 +button events but no pointer events. +Property: "Synaptics Gestures Only" +. ++ .SH CONFIGURATION DETAILS .SS Area handling -@@ -822,6 +830,10 @@ disables the button area. +@@ -907,6 +916,10 @@ disables the button area. 32 bit, 8 values, RBL, RBR, RBT, RBB, MBL, MBR, MBT, MBB. .TP 7 @@ -40,19 +80,11 @@ index 079a5f8..836bf69 100644 .BI "Synaptics Capabilities" This read-only property expresses the physical capability of the touchpad, most notably whether the touchpad hardware supports multi-finger tapping and -@@ -833,7 +845,6 @@ right button, two-finger detection, three-finger detection, pressure detection, - .TP 7 - .BI "Synaptics Pad Resolution" - 32 bit unsigned, 2 values (read-only), vertical, horizontal in units/millimeter. -- - .SH "NOTES" - Configuration through - .I InputClass diff --git a/src/properties.c b/src/properties.c -index dd88fc7..6e838ff 100644 +index 718d054..6e376f9 100644 --- a/src/properties.c +++ b/src/properties.c -@@ -91,6 +91,7 @@ Atom prop_softbutton_areas = 0; +@@ -95,6 +95,7 @@ Atom prop_secondary_softbutton_areas = 0; Atom prop_noise_cancellation = 0; Atom prop_product_id = 0; Atom prop_device_node = 0; @@ -60,18 +92,18 @@ index dd88fc7..6e838ff 100644 static Atom InitTypedAtom(DeviceIntPtr dev, char *name, Atom type, int format, int nvalues, -@@ -341,6 +342,10 @@ InitDeviceProperties(InputInfoPtr pInfo) +@@ -381,6 +382,10 @@ InitDeviceProperties(InputInfoPtr pInfo) SYNAPTICS_PROP_NOISE_CANCELLATION, 32, 2, values); + prop_gestures_only = + InitAtom(pInfo->dev, SYNAPTICS_PROP_GESTURES_ONLY, 8, 1, -+ ¶->gestures_only); ++ ¶->gestures_only); + /* only init product_id property if we actually know them */ if (priv->id_vendor || priv->id_product) { values[0] = priv->id_vendor; -@@ -705,6 +710,12 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, +@@ -814,6 +819,12 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, para->hyst_x = hyst[0]; para->hyst_y = hyst[1]; } @@ -85,39 +117,35 @@ index dd88fc7..6e838ff 100644 return BadValue; /* read-only */ else { /* unknown property */ diff --git a/src/synaptics.c b/src/synaptics.c -index e391a98..8302cbb 100644 +index 2d49a12..168bdba 100644 --- a/src/synaptics.c +++ b/src/synaptics.c -@@ -646,7 +646,10 @@ set_default_parameters(InputInfoPtr pInfo) +@@ -673,6 +673,7 @@ set_default_parameters(InputInfoPtr pInfo) pars->tap_move = xf86SetIntOption(opts, "MaxTapMove", tapMove); - pars->tap_time_2 = xf86SetIntOption(opts, "MaxDoubleTapTime", 180); + pars->tap_time_2 = xf86SetIntOption(opts, "MaxDoubleTapTime", 100); pars->click_time = xf86SetIntOption(opts, "ClickTime", 100); -- pars->clickpad = xf86SetBoolOption(opts, "ClickPad", pars->clickpad); /* Probed */ -+ pars->gestures_only = xf86SetBoolOption(opts, "GesturesOnly", -+ pars->gestures_only); -+ pars->clickpad = xf86SetBoolOption(opts, "ClickPad", pars->clickpad); -+ /* Probed */ - /* middle mouse button emulation on a clickpad? nah, you're joking */ - middle_button_timeout = pars->clickpad ? 0 : 75; - pars->emulate_mid_button_time = -@@ -2901,7 +2904,7 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now, - } ++ pars->gestures_only = xf86SetBoolOption(opts, "GesturesOnly", pars->gestures_only); + pars->clickpad = xf86SetBoolOption(opts, "ClickPad", pars->clickpad); /* Probed */ + if (pars->clickpad) + pars->has_secondary_buttons = xf86SetBoolOption(opts, +@@ -3207,7 +3208,7 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now, + buttons |= 1 << (priv->tap_button - 1); /* Post events */ -- if (finger >= FS_TOUCHED && (dx || dy)) -+ if (finger >= FS_TOUCHED && (dx || dy) && !para->gestures_only) +- if (finger >= FS_TOUCHED && (dx || dy) && !ignore_motion) ++ if (finger >= FS_TOUCHED && (dx || dy) && !ignore_motion && !para->gestures_only) xf86PostMotionEvent(pInfo->dev, 0, 0, 2, dx, dy); if (priv->mid_emu_state == MBE_LEFT_CLICK) { diff --git a/src/synapticsstr.h b/src/synapticsstr.h -index a9901a2..6678d34 100644 +index 8917991..4181407 100644 --- a/src/synapticsstr.h +++ b/src/synapticsstr.h -@@ -196,6 +196,7 @@ typedef struct _SynapticsParameters { +@@ -225,6 +225,7 @@ typedef struct _SynapticsParameters { int area_left_edge, area_right_edge, area_top_edge, area_bottom_edge; /* area coordinates absolute */ - int softbutton_areas[2][4]; /* soft button area coordinates, 0 => right, 1 => middle button */ + int softbutton_areas[4][4]; /* soft button area coordinates, 0 => right, 1 => middle , 2 => secondary right, 3 => secondary middle button */ int hyst_x, hyst_y; /* x and y width of hysteresis box */ -+ Bool gestures_only; /* do not post mouse input events */ ++ Bool gestures_only; /* do not post mouse input events */ } SynapticsParameters; struct _SynapticsPrivateRec { |