diff options
author | Thomas Jost | 2014-03-12 17:40:30 +0100 |
---|---|---|
committer | Thomas Jost | 2014-03-12 17:40:30 +0100 |
commit | b21fb1f081a55dc0a10736b9cebface8d99cd50f (patch) | |
tree | 927fee8646fefeb97a4fe545c8253d0cb2f94971 | |
download | aur-b21fb1f081a55dc0a10736b9cebface8d99cd50f.tar.gz |
xf86-input-synaptics-gesturesonly
-rw-r--r-- | .SRCINFO | 35 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | 14393-gestures-only.master.patch | 112 | ||||
-rw-r--r-- | 14393-gestures-only.patch | 123 | ||||
-rw-r--r-- | 50-synaptics.conf.patch | 15 | ||||
-rw-r--r-- | PKGBUILD | 61 |
6 files changed, 347 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..4e7ba2e7b601 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,35 @@ +pkgbase = xf86-input-synaptics-gesturesonly + pkgdesc = Synaptics driver for notebook touchpads + pkgver = 1.7.4.r0.g8a5533a + pkgrel = 1 + url = http://patchwork.freedesktop.org/patch/14393/ + arch = i686 + arch = x86_64 + groups = xorg-input-drivers + license = custom + makedepends = pkgconfig + makedepends = xorg-server + makedepends = git + makedepends = xorg-server-devel + depends = libxtst + depends = mtdev + provides = synaptics + provides = xf86-input-synaptics + conflicts = synaptics + options = !libtool + options = zipman + source = xf86-input-synaptics::git://anongit.freedesktop.org/xorg/driver/xf86-input-synaptics#branch=synaptics-1.7-branch + source = 50-synaptics.conf.patch + source = 14393-gestures-only.patch + source = 14393-gestures-only.master.patch + md5sums = SKIP + md5sums = 5ae00aad3e70265defa5bd08da621b5c + md5sums = ccbc1ece7233f41dceeb7243d09cf8f1 + md5sums = b3ccf67c831b3e9a81dd670c4dfa8e8c + sha256sums = SKIP + sha256sums = 8c24a04508acfab32b78e8dfbebe589e35f908cc74f1225215eed6fd48c530c3 + sha256sums = 6251c0b586e8679857a9b5edc66568ae47d838520bf5da114d39210cbefbe3f8 + sha256sums = 05ab21d33fe7131e7a16a3b69ef741f950fedadb507364d3bbd3d486c3b55270 + +pkgname = xf86-input-synaptics-gesturesonly + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..28702fdbd0e5 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +xf86-input-synaptics/ diff --git a/14393-gestures-only.master.patch b/14393-gestures-only.master.patch new file mode 100644 index 000000000000..7b3920e604b0 --- /dev/null +++ b/14393-gestures-only.master.patch @@ -0,0 +1,112 @@ +diff --git a/include/synaptics-properties.h b/include/synaptics-properties.h +index 32ab2e1..91d8160 100644 +--- a/include/synaptics-properties.h ++++ b/include/synaptics-properties.h +@@ -158,4 +158,7 @@ + /* 32 Bit Integer, 2 values, horizontal hysteresis, vertical hysteresis */ + #define SYNAPTICS_PROP_NOISE_CANCELLATION "Synaptics Noise Cancellation" + ++/* 8 bit (BOOL) */ ++#define SYNAPTICS_PROP_GESTURES_ONLY "Synaptics Gestures Only" ++ + #endif /* _SYNAPTICS_PROPERTIES_H_ */ +diff --git a/man/synaptics.man b/man/synaptics.man +index 97f0114..a1331c0 100644 +--- a/man/synaptics.man ++++ b/man/synaptics.man +@@ -502,6 +502,15 @@ Property: "Synaptics Secondary Soft Button Areas". This property is only + initialized if the option is set in the + __xconfigfile__(__filemansuffix__). + . ++.TP ++.BI "Option \*qGesturesOnly\*q \*q" boolean \*q ++Disable pointer motion events. ++ ++The option is disabled by default. If set, the driver will report gesture and ++button events but no pointer events. ++Property: "Synaptics Gestures Only" ++. ++ + + .SH CONFIGURATION DETAILS + .SS Area handling +@@ -885,6 +894,10 @@ disables the button area. + 32 bit, 8 values, RBL, RBR, RBT, RBB, MBL, MBR, MBT, MBB. + + .TP 7 ++.BI "Synaptics Gestures Only" ++8 bit (BOOL). ++ ++.TP 7 + .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 +diff --git a/src/properties.c b/src/properties.c +index 4c75797..3035802 100644 +--- a/src/properties.c ++++ b/src/properties.c +@@ -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; ++Atom prop_gestures_only = 0; + + static Atom + InitTypedAtom(DeviceIntPtr dev, char *name, Atom type, int format, int nvalues, +@@ -378,6 +379,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); ++ + /* only init product_id property if we actually know them */ + if (priv->id_vendor || priv->id_product) { + values[0] = priv->id_vendor; +@@ -811,6 +816,12 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, + para->hyst_x = hyst[0]; + para->hyst_y = hyst[1]; + } ++ else if (property == prop_gestures_only) { ++ if (prop->size != 1 || prop->format != 8 || prop->type != XA_INTEGER) ++ return BadMatch; ++ ++ para->gestures_only = *(BOOL *) prop->data; ++ } + else if (property == prop_product_id || property == prop_device_node) + return BadValue; /* read-only */ + else { /* unknown property */ +diff --git a/src/synaptics.c b/src/synaptics.c +index aeb1c57..43b164a 100644 +--- a/src/synaptics.c ++++ b/src/synaptics.c +@@ -671,6 +671,7 @@ set_default_parameters(InputInfoPtr pInfo) + pars->tap_move = xf86SetIntOption(opts, "MaxTapMove", tapMove); + pars->tap_time_2 = xf86SetIntOption(opts, "MaxDoubleTapTime", 180); + pars->click_time = xf86SetIntOption(opts, "ClickTime", 100); ++ pars->gestures_only = xf86SetBoolOption(opts, "GesturesOnly", pars->gestures_only); + pars->clickpad = xf86SetBoolOption(opts, "ClickPad", pars->clickpad); /* Probed */ + pars->clickpad_ignore_motion_time = 100; /* ms */ + /* middle mouse button emulation on a clickpad? nah, you're joking */ +@@ -3207,7 +3208,7 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now, + } + + /* Post events */ +- 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 b8a3492..3e9fa3a 100644 +--- a/src/synapticsstr.h ++++ b/src/synapticsstr.h +@@ -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[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 */ + } SynapticsParameters; + + struct _SynapticsPrivateRec { diff --git a/14393-gestures-only.patch b/14393-gestures-only.patch new file mode 100644 index 000000000000..7b2e35230d25 --- /dev/null +++ b/14393-gestures-only.patch @@ -0,0 +1,123 @@ +diff --git a/include/synaptics-properties.h b/include/synaptics-properties.h +index b717880..22a12cd 100644 +--- a/include/synaptics-properties.h ++++ b/include/synaptics-properties.h +@@ -152,4 +152,7 @@ + /* 32 Bit Integer, 2 values, horizontal hysteresis, vertical hysteresis */ + #define SYNAPTICS_PROP_NOISE_CANCELLATION "Synaptics Noise Cancellation" + ++/* 8 bit (BOOL) */ ++#define SYNAPTICS_PROP_GESTURES_ONLY "Synaptics Gestures Only" ++ + #endif /* _SYNAPTICS_PROPERTIES_H_ */ +diff --git a/man/synaptics.man b/man/synaptics.man +index 079a5f8..836bf69 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" + . ++.TP ++.BI "Option \*qGesturesOnly\*q \*q" boolean \*q ++Disable pointer motion events. ++ ++The option is disabled by default. If set, the driver will report gesture and ++button events but no pointer events. ++Property: "Synaptics Gestures Only" ++. + + .SH CONFIGURATION DETAILS + .SS Area handling +@@ -822,6 +830,10 @@ disables the button area. + 32 bit, 8 values, RBL, RBR, RBT, RBB, MBL, MBR, MBT, MBB. + + .TP 7 ++.BI "Synaptics Gestures Only" ++8 bit (BOOL). ++ ++.TP 7 + .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 +--- a/src/properties.c ++++ b/src/properties.c +@@ -91,6 +91,7 @@ Atom prop_softbutton_areas = 0; + Atom prop_noise_cancellation = 0; + Atom prop_product_id = 0; + Atom prop_device_node = 0; ++Atom prop_gestures_only = 0; + + static Atom + InitTypedAtom(DeviceIntPtr dev, char *name, Atom type, int format, int nvalues, +@@ -341,6 +342,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); ++ + /* 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, + para->hyst_x = hyst[0]; + para->hyst_y = hyst[1]; + } ++ else if (property == prop_gestures_only) { ++ if (prop->size != 1 || prop->format != 8 || prop->type != XA_INTEGER) ++ return BadMatch; ++ ++ para->gestures_only = *(BOOL *) prop->data; ++ } + else if (property == prop_product_id || property == prop_device_node) + return BadValue; /* read-only */ + else { /* unknown property */ +diff --git a/src/synaptics.c b/src/synaptics.c +index e391a98..8302cbb 100644 +--- a/src/synaptics.c ++++ b/src/synaptics.c +@@ -646,7 +646,10 @@ set_default_parameters(InputInfoPtr pInfo) + pars->tap_move = xf86SetIntOption(opts, "MaxTapMove", tapMove); + pars->tap_time_2 = xf86SetIntOption(opts, "MaxDoubleTapTime", 180); + 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, + } + + /* Post events */ +- if (finger >= FS_TOUCHED && (dx || dy)) ++ if (finger >= FS_TOUCHED && (dx || dy) && !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 +--- a/src/synapticsstr.h ++++ b/src/synapticsstr.h +@@ -196,6 +196,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 hyst_x, hyst_y; /* x and y width of hysteresis box */ ++ Bool gestures_only; /* do not post mouse input events */ + } SynapticsParameters; + + struct _SynapticsPrivateRec { diff --git a/50-synaptics.conf.patch b/50-synaptics.conf.patch new file mode 100644 index 000000000000..64df6064229d --- /dev/null +++ b/50-synaptics.conf.patch @@ -0,0 +1,15 @@ +17a18,31 +> +> # 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" diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..11f28d5c4a32 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,61 @@ +# Maintainer: Thomas Jost <schnouki@schnouki.net> +# Contributor: Andreas B. Wagner <AndreasBWagner@pointfree.net> +# Contributor: Kaos < gianlucaatlas_AT_gmail_DOT_com > + +_use_master=0 + +pkgname=xf86-input-synaptics-gesturesonly +_pkgname=xf86-input-synaptics +pkgver=1.7.4.r0.g8a5533a +pkgrel=1 +pkgdesc="Synaptics driver for notebook touchpads" +arch=('i686' 'x86_64') +url="http://patchwork.freedesktop.org/patch/14393/" +license=('custom') +depends=('libxtst' 'mtdev') +makedepends=('pkgconfig' 'xorg-server' 'git' 'xorg-server-devel') +provides=('synaptics' 'xf86-input-synaptics') +conflicts=('synaptics') +groups=('xorg-input-drivers') +options=('!libtool' 'zipman') +_branch=master +[[ "$_use_master" == 0 ]] && _branch="synaptics-1.7-branch" +source=("$_pkgname"::'git://anongit.freedesktop.org/xorg/driver/xf86-input-synaptics#branch='"$_branch" + '50-synaptics.conf.patch' + '14393-gestures-only.patch' + '14393-gestures-only.master.patch') +md5sums=('SKIP' + '5ae00aad3e70265defa5bd08da621b5c' + 'ccbc1ece7233f41dceeb7243d09cf8f1' + 'b3ccf67c831b3e9a81dd670c4dfa8e8c') +sha256sums=('SKIP' + '8c24a04508acfab32b78e8dfbebe589e35f908cc74f1225215eed6fd48c530c3' + '6251c0b586e8679857a9b5edc66568ae47d838520bf5da114d39210cbefbe3f8' + '05ab21d33fe7131e7a16a3b69ef741f950fedadb507364d3bbd3d486c3b55270') + +pkgver() { + cd "$srcdir/$_pkgname" + # Use the tag of the last commit + git describe --long | sed -E "s/$_pkgname-//; "'s/([^-]*-g)/r\1/;s/-/./g' +} + +build() { + cd "$srcdir/$_pkgname" + + if [[ "$_use_master" == 0 ]]; then + patch -p1 < $srcdir/14393-gestures-only.patch + else + patch -p1 < $srcdir/14393-gestures-only.patch + fi + + ./autogen.sh + ./configure --prefix=/usr --with-xorg-conf-dir=/etc/X11/xorg.conf.d + make + patch conf/50-synaptics.conf < $srcdir/50-synaptics.conf.patch +} +package() { + cd "$srcdir/$_pkgname" + make DESTDIR="${pkgdir}" install + install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}" + install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/" +} |