summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorvantu5z2015-10-29 12:45:17 +0300
committervantu5z2015-10-29 12:45:17 +0300
commit3a6a0883a3c05ddcefa0e933d39ebe36e2e79629 (patch)
treed461c429cca7c00ee482916eb101f55e3fe9e9da
parent74afaf09b42b2737f0af6535951942851022ec7b (diff)
downloadaur-3a6a0883a3c05ddcefa0e933d39ebe36e2e79629.tar.gz
Update to 1.7.6
-rw-r--r--.SRCINFO17
-rw-r--r--0001-Add-the-embedded-LED-support.patch220
-rw-r--r--0003-Add-LED-debugging-statements.patch32
-rw-r--r--PKGBUILD19
-rw-r--r--led_support.patch (renamed from 0002-Add-tap-on-LED-feature-support.patch)312
5 files changed, 217 insertions, 383 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 11c8611c606..194be2d4c7a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = xf86-input-synaptics-led
pkgdesc = Synaptics driver for notebook touchpads (with LED disable support)
- pkgver = 1.7.1
- pkgrel = 4
+ pkgver = 1.7.6
+ pkgrel = 1
url = http://xorg.freedesktop.org/
arch = i686
arch = x86_64
@@ -21,15 +21,10 @@ pkgbase = xf86-input-synaptics-led
conflicts = xf86-input-synaptics
replaces = synaptics
options = !libtool
- backup = etc/X11/xorg.conf.d/50-synaptics.conf
- source = http://xorg.freedesktop.org/releases/individual/driver/xf86-input-synaptics-1.7.1.tar.bz2
- source = 0001-Add-the-embedded-LED-support.patch
- source = 0002-Add-tap-on-LED-feature-support.patch
- source = 0003-Add-LED-debugging-statements.patch
- md5sums = 6505de717972b6a24b8eb13e69eb996c
- md5sums = 8ebf3e1609786c9699ca17fff450770e
- md5sums = 7312702cb1f7acf70a18e4ff2862f847
- md5sums = d48ab540ea8fd2cf7f86c38e52116b3f
+ source = http://xorg.freedesktop.org/releases/individual/driver/xf86-input-synaptics-1.7.6.tar.bz2
+ source = led_support.patch
+ md5sums = f1a501caa0da0bf0e78f249c5ed9bd73
+ md5sums = d4e3cd69e96405cd37df19f8043161da
pkgname = xf86-input-synaptics-led
diff --git a/0001-Add-the-embedded-LED-support.patch b/0001-Add-the-embedded-LED-support.patch
deleted file mode 100644
index bbdf34fac08..00000000000
--- a/0001-Add-the-embedded-LED-support.patch
+++ /dev/null
@@ -1,220 +0,0 @@
-From bd5dbee2b3ea2a2ce57b3171992f791a23f27e34 Mon Sep 17 00:00:00 2001
-Message-Id: <bd5dbee2b3ea2a2ce57b3171992f791a23f27e34.1368405776.git.matthew.monaco@0x01b.net>
-From: Takashi Iwai <tiwai@suse.de>
-Date: Mon, 10 May 2010 18:15:48 +0200
-Subject: [PATCH 1/3] Add the embedded LED support
-
-This patch adds the control of the embedded LED on the top-left corner
-of new Synaptics devices. For LED control, it requires the patch to
-Linux synaptics input driver,
- https://patchwork.kernel.org/patch/92434/
-
-When a sysfs file /sys/class/leds/psmouse::synaptics exists, the driver
-assumes it supports the embeded LED control.
-
-The LED can be controlled via new properties, "Synaptics LED" and
-"Synaptics LED Status".
-
-Signed-off-by: Takashi Iwai <tiwai@suse.de>
----
- include/synaptics-properties.h | 6 ++++++
- man/synaptics.man | 9 +++++++++
- src/eventcomm.c | 34 +++++++++++++++++++++++++++++++++-
- src/properties.c | 15 +++++++++++++++
- src/synapticsstr.h | 2 ++
- src/synproto.h | 1 +
- tools/synclient.c | 1 +
- 7 files changed, 67 insertions(+), 1 deletion(-)
-
-diff --git a/include/synaptics-properties.h b/include/synaptics-properties.h
-index b717880..8753609 100644
---- a/include/synaptics-properties.h
-+++ b/include/synaptics-properties.h
-@@ -152,4 +152,10 @@
- /* 32 Bit Integer, 2 values, horizontal hysteresis, vertical hysteresis */
- #define SYNAPTICS_PROP_NOISE_CANCELLATION "Synaptics Noise Cancellation"
-
-+/* 8 bit (BOOL, read-only), has_led */
-+#define SYNAPTICS_PROP_LED "Synaptics LED"
-+
-+/* 8 bit (BOOL), led_status (on/off) */
-+#define SYNAPTICS_PROP_LED_STATUS "Synaptics LED Status"
-+
- #endif /* _SYNAPTICS_PROPERTIES_H_ */
-diff --git a/man/synaptics.man b/man/synaptics.man
-index 079a5f8..d1afdd0 100644
---- a/man/synaptics.man
-+++ b/man/synaptics.man
-@@ -834,6 +834,15 @@ right button, two-finger detection, three-finger detection, pressure detection,
- .BI "Synaptics Pad Resolution"
- 32 bit unsigned, 2 values (read-only), vertical, horizontal in units/millimeter.
-
-+.TP 7
-+.BI "Synaptics LED"
-+8 bit (BOOL, read-only), indicating whether the device has an embedded
-+LED support or not.
-+
-+.TP 7
-+.BI "Synaptics LED Status"
-+8 bit (BOOL), the light status of the embedded LED.
-+
- .SH "NOTES"
- Configuration through
- .I InputClass
-diff --git a/src/eventcomm.c b/src/eventcomm.c
-index 258a538..8edd84d 100644
---- a/src/eventcomm.c
-+++ b/src/eventcomm.c
-@@ -59,6 +59,8 @@
- #define LONG(x) ((x) / LONG_BITS)
- #define TEST_BIT(bit, array) ((array[LONG(bit)] >> OFF(bit)) & 1)
-
-+#define SYNAPTICS_LED_SYS_FILE "/sys/class/leds/psmouse::synaptics/brightness"
-+
- /**
- * Protocol-specific data.
- */
-@@ -373,6 +375,32 @@ event_get_abs(InputInfoPtr pInfo, int fd, int code,
- return 0;
- }
-
-+static void
-+event_query_led(InputInfoPtr pInfo)
-+{
-+ SynapticsPrivate *priv = (SynapticsPrivate *)pInfo->private;
-+
-+ priv->synpara.has_led = !access(SYNAPTICS_LED_SYS_FILE, W_OK);
-+}
-+
-+static void EventUpdateLED(InputInfoPtr pInfo)
-+{
-+ SynapticsPrivate *priv = (SynapticsPrivate *)pInfo->private;
-+
-+ if (priv->synpara.has_led) {
-+ char *val = priv->synpara.led_status ? "255" : "0";
-+ int fd = open(SYNAPTICS_LED_SYS_FILE, O_WRONLY);
-+ int err;
-+
-+ if (fd < 0)
-+ return;
-+ err = write(fd, val, strlen(val));
-+ close(fd);
-+ if (err < 0)
-+ xf86IDrvMsg(pInfo, X_WARNING, "can't write LED value %s\n", val);
-+ }
-+}
-+
- /* Query device for axis ranges */
- static void
- event_query_axis_ranges(InputInfoPtr pInfo)
-@@ -879,6 +907,9 @@ EventReadDevDimensions(InputInfoPtr pInfo)
- event_query_model(pInfo->fd, &priv->model, &priv->id_vendor,
- &priv->id_product);
-
-+ event_query_led(pInfo);
-+ event_query_model(pInfo->fd, &priv->model, &priv->id_vendor, &priv->id_product);
-+
- xf86IDrvMsg(pInfo, X_PROBED, "Vendor %#hx Product %#hx\n",
- priv->id_vendor, priv->id_product);
- }
-@@ -958,5 +989,6 @@ struct SynapticsProtocolOperations event_proto_operations = {
- EventQueryHardware,
- EventReadHwState,
- EventAutoDevProbe,
-- EventReadDevDimensions
-+ EventReadDevDimensions,
-+ EventUpdateLED,
- };
-diff --git a/src/properties.c b/src/properties.c
-index dd88fc7..7de4a14 100644
---- a/src/properties.c
-+++ b/src/properties.c
-@@ -91,6 +91,8 @@ Atom prop_softbutton_areas = 0;
- Atom prop_noise_cancellation = 0;
- Atom prop_product_id = 0;
- Atom prop_device_node = 0;
-+Atom prop_led = 0;
-+Atom prop_led_status = 0;
-
- static Atom
- InitTypedAtom(DeviceIntPtr dev, char *name, Atom type, int format, int nvalues,
-@@ -341,6 +343,9 @@ InitDeviceProperties(InputInfoPtr pInfo)
- SYNAPTICS_PROP_NOISE_CANCELLATION, 32, 2,
- values);
-
-+ prop_led = InitAtom(pInfo->dev, SYNAPTICS_PROP_LED, 8, 1, &para->has_led);
-+ prop_led_status = InitAtom(pInfo->dev, SYNAPTICS_PROP_LED_STATUS, 8, 1, &para->led_status);
-+
- /* 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,16 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
- para->hyst_x = hyst[0];
- para->hyst_y = hyst[1];
- }
-+ else if (property == prop_led_status) {
-+ if (prop->size != 1 || prop->format != 8 || prop->type != XA_INTEGER)
-+ return BadMatch;
-+
-+ if (para->has_led) {
-+ para->led_status = *(BOOL*)prop->data;
-+ if (priv->proto_ops && priv->proto_ops->UpdateLED)
-+ priv->proto_ops->UpdateLED(pInfo);
-+ }
-+ }
- else if (property == prop_product_id || property == prop_device_node)
- return BadValue; /* read-only */
- else { /* unknown property */
-diff --git a/src/synapticsstr.h b/src/synapticsstr.h
-index 428befa..c84e1b6 100644
---- a/src/synapticsstr.h
-+++ b/src/synapticsstr.h
-@@ -188,6 +188,8 @@ 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 has_led; /* has an embedded LED */
-+ Bool led_status; /* Current status of LED (1=on) */
- } SynapticsParameters;
-
- struct _SynapticsPrivateRec {
-diff --git a/src/synproto.h b/src/synproto.h
-index f164393..ac4ab10 100644
---- a/src/synproto.h
-+++ b/src/synproto.h
-@@ -103,6 +103,7 @@ struct SynapticsProtocolOperations {
- struct SynapticsHwState * hwRet);
- Bool (*AutoDevProbe) (InputInfoPtr pInfo, const char *device);
- void (*ReadDevDimensions) (InputInfoPtr pInfo);
-+ void (*UpdateLED)(InputInfoPtr pInfo);
- };
-
- #ifdef BUILD_PS2COMM
-diff --git a/src/synproto.h b/src/synproto.h
-index f164393..ac4ab10 100644
---- a/src/synproto.h
-+++ b/src/synproto.h
-@@ -31,6 +31,7 @@
- #include "config.h"
- #endif
-
-+#include <xorg-server.h>
- #include <unistd.h>
- #include <sys/ioctl.h>
- #include <xf86Xinput.h>
-
-diff --git a/tools/synclient.c b/tools/synclient.c
-index bd7cb61..f61ed45 100644
---- a/tools/synclient.c
-+++ b/tools/synclient.c
-@@ -140,6 +140,7 @@ static struct Parameter params[] = {
- {"MiddleButtonAreaRight", PT_INT, INT_MIN, INT_MAX, SYNAPTICS_PROP_SOFTBUTTON_AREAS, 32, 5},
- {"MiddleButtonAreaTop", PT_INT, INT_MIN, INT_MAX, SYNAPTICS_PROP_SOFTBUTTON_AREAS, 32, 6},
- {"MiddleButtonAreaBottom", PT_INT, INT_MIN, INT_MAX, SYNAPTICS_PROP_SOFTBUTTON_AREAS, 32, 7},
-+ {"LEDStatus", PT_BOOL, 0, 1, SYNAPTICS_PROP_LED_STATUS, 8, 0},
- { NULL, 0, 0, 0, 0 }
- };
-
---
-1.8.2.3
-
diff --git a/0003-Add-LED-debugging-statements.patch b/0003-Add-LED-debugging-statements.patch
deleted file mode 100644
index b959e379e08..00000000000
--- a/0003-Add-LED-debugging-statements.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From aa3427f11c6da56f10cf22ef479f80063916325c Mon Sep 17 00:00:00 2001
-Message-Id: <aa3427f11c6da56f10cf22ef479f80063916325c.1368405776.git.matthew.monaco@0x01b.net>
-In-Reply-To: <bd5dbee2b3ea2a2ce57b3171992f791a23f27e34.1368405776.git.matthew.monaco@0x01b.net>
-References: <bd5dbee2b3ea2a2ce57b3171992f791a23f27e34.1368405776.git.matthew.monaco@0x01b.net>
-From: Matthew Monaco <matthew.monaco@0x01b.net>
-Date: Wed, 21 Nov 2012 13:50:12 -0700
-Subject: [PATCH 3/3] Add LED debugging statements
-
----
- src/eventcomm.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/src/eventcomm.c b/src/eventcomm.c
-index 8edd84d..67c0512 100644
---- a/src/eventcomm.c
-+++ b/src/eventcomm.c
-@@ -380,7 +380,12 @@ event_query_led(InputInfoPtr pInfo)
- {
- SynapticsPrivate *priv = (SynapticsPrivate *)pInfo->private;
-
-+ xf86IDrvMsg(pInfo, X_INFO, "led: checking for access to %s\n", SYNAPTICS_LED_SYS_FILE);
- priv->synpara.has_led = !access(SYNAPTICS_LED_SYS_FILE, W_OK);
-+ if (priv->synpara.has_led)
-+ xf86IDrvMsg(pInfo, X_INFO, "led: access ok\n");
-+ else
-+ xf86IDrvMsg(pInfo, X_INFO, "led: no access\n");
- }
-
- static void EventUpdateLED(InputInfoPtr pInfo)
---
-1.8.2.3
-
diff --git a/PKGBUILD b/PKGBUILD
index 21947384924..6a17794c98d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,8 +7,8 @@
_pkgname=xf86-input-synaptics
pkgname=$_pkgname-led
-pkgver=1.7.1
-pkgrel=4
+pkgver=1.7.6
+pkgrel=1
pkgdesc="Synaptics driver for notebook touchpads (with LED disable support)"
arch=(i686 x86_64)
license=(custom)
@@ -22,17 +22,10 @@ groups=(xorg-drivers xorg)
options=(!libtool)
source=(
http://xorg.freedesktop.org/releases/individual/driver/${_pkgname}-${pkgver}.tar.bz2
- 0001-Add-the-embedded-LED-support.patch
- 0002-Add-tap-on-LED-feature-support.patch
- 0003-Add-LED-debugging-statements.patch
-)
-md5sums=('6505de717972b6a24b8eb13e69eb996c'
- '8ebf3e1609786c9699ca17fff450770e'
- '7312702cb1f7acf70a18e4ff2862f847'
- 'd48ab540ea8fd2cf7f86c38e52116b3f')
-backup=(
- etc/X11/xorg.conf.d/50-synaptics.conf
+ led_support.patch
)
+md5sums=('f1a501caa0da0bf0e78f249c5ed9bd73'
+ 'd4e3cd69e96405cd37df19f8043161da')
build() {
cd "${srcdir}/${_pkgname}-${pkgver}"
@@ -51,6 +44,4 @@ package() {
install -m644 "conf/50-synaptics.conf" "${pkgdir}/etc/X11/xorg.conf.d/"
install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
-
- rm -rf "${pkgdir}/usr/share/X11"
}
diff --git a/0002-Add-tap-on-LED-feature-support.patch b/led_support.patch
index a6591a55a00..19b12903315 100644
--- a/0002-Add-tap-on-LED-feature-support.patch
+++ b/led_support.patch
@@ -1,38 +1,24 @@
-From 3164978016c87ed95e1386bf6db320d6c30bdbd1 Mon Sep 17 00:00:00 2001
-Message-Id: <3164978016c87ed95e1386bf6db320d6c30bdbd1.1368405776.git.matthew.monaco@0x01b.net>
-In-Reply-To: <bd5dbee2b3ea2a2ce57b3171992f791a23f27e34.1368405776.git.matthew.monaco@0x01b.net>
-References: <bd5dbee2b3ea2a2ce57b3171992f791a23f27e34.1368405776.git.matthew.monaco@0x01b.net>
-From: Takashi Iwai <tiwai@suse.de>
-Date: Tue, 15 Jun 2010 16:54:07 +0200
-Subject: [PATCH 2/3] Add tap-on-LED feature support
-
-Signed-off-by: Takashi Iwai <tiwai@suse.de>
----
- include/synaptics-properties.h | 3 +
- man/synaptics.man | 17 ++++++
- src/properties.c | 20 +++++++
- src/synaptics.c | 122 ++++++++++++++++++++++++++++++++++++++++-
- src/synapticsstr.h | 6 ++
- tools/synclient.c | 1 +
- 6 files changed, 167 insertions(+), 2 deletions(-)
-
-diff --git a/include/synaptics-properties.h b/include/synaptics-properties.h
-index 8753609..ab256be 100644
---- a/include/synaptics-properties.h
-+++ b/include/synaptics-properties.h
-@@ -158,4 +158,7 @@
- /* 8 bit (BOOL), led_status (on/off) */
- #define SYNAPTICS_PROP_LED_STATUS "Synaptics LED Status"
+diff -ur xf86-input-synaptics-1.7.6/include/synaptics-properties.h xf86-input-synaptics-1.7.6_new/include/synaptics-properties.h
+--- xf86-input-synaptics-1.7.6/include/synaptics-properties.h 2014-05-01 08:18:12.000000000 +0400
++++ xf86-input-synaptics-1.7.6_new/include/synaptics-properties.h 2015-10-29 11:37:06.960956364 +0300
+@@ -158,4 +158,13 @@
+ /* 32 Bit Integer, 2 values, horizontal hysteresis, vertical hysteresis */
+ #define SYNAPTICS_PROP_NOISE_CANCELLATION "Synaptics Noise Cancellation"
++/* 8 bit (BOOL, read-only), has_led */
++#define SYNAPTICS_PROP_LED "Synaptics LED"
++
++/* 8 bit (BOOL), led_status (on/off) */
++#define SYNAPTICS_PROP_LED_STATUS "Synaptics LED Status"
++
+/* 8 bit (BOOL), double-tap action on LED corner (on/off) */
+#define SYNAPTICS_PROP_LED_DOUBLE_TAP "Synaptics LED Dobule Tap"
+
#endif /* _SYNAPTICS_PROPERTIES_H_ */
-diff --git a/man/synaptics.man b/man/synaptics.man
-index d1afdd0..1c3bd45 100644
---- a/man/synaptics.man
-+++ b/man/synaptics.man
-@@ -501,6 +501,19 @@ coordinates are less than MaxTapMove units apart.
+diff -ur xf86-input-synaptics-1.7.6/man/synaptics.man xf86-input-synaptics-1.7.6_new/man/synaptics.man
+--- xf86-input-synaptics-1.7.6/man/synaptics.man 2014-05-01 08:18:12.000000000 +0400
++++ xf86-input-synaptics-1.7.6_new/man/synaptics.man 2015-10-29 11:38:20.123434539 +0300
+@@ -573,6 +573,19 @@
A "touch" event happens when the Z value goes above FingerHigh, and an
"untouch" event happens when the Z value goes below FingerLow.
.
@@ -52,42 +38,133 @@ index d1afdd0..1c3bd45 100644
.LP
The MaxDoubleTapTime parameter has the same function as the MaxTapTime
parameter, but for the second, third, etc tap in a tap sequence.
-@@ -843,6 +856,10 @@ LED support or not.
- .BI "Synaptics LED Status"
- 8 bit (BOOL), the light status of the embedded LED.
+@@ -919,6 +932,19 @@
+ .BI "Synaptics Pad Resolution"
+ 32 bit unsigned, 2 values (read-only), vertical, horizontal in units/millimeter.
+.TP 7
++.BI "Synaptics LED"
++8 bit (BOOL, read-only), indicating whether the device has an embedded
++LED support or not.
++
++.TP 7
++.BI "Synaptics LED Status"
++8 bit (BOOL), the light status of the embedded LED.
++
++.TP 7
+.BI "Synaptics LED Double Tap"
+8 bit (BOOL), enable/disable the double-tap on LED.
+
.SH "NOTES"
Configuration through
.I InputClass
-diff --git a/src/properties.c b/src/properties.c
-index 7de4a14..76038ec 100644
---- a/src/properties.c
-+++ b/src/properties.c
-@@ -93,6 +93,7 @@ Atom prop_product_id = 0;
+diff -ur xf86-input-synaptics-1.7.6/src/eventcomm.c xf86-input-synaptics-1.7.6_new/src/eventcomm.c
+--- xf86-input-synaptics-1.7.6/src/eventcomm.c 2014-05-13 05:33:21.000000000 +0400
++++ xf86-input-synaptics-1.7.6_new/src/eventcomm.c 2015-10-29 11:48:24.683944284 +0300
+@@ -62,6 +62,8 @@
+ #define LONG(x) ((x) / LONG_BITS)
+ #define TEST_BIT(bit, array) ((array[LONG(bit)] >> OFF(bit)) & 1)
+
++#define SYNAPTICS_LED_SYS_FILE "/sys/class/leds/psmouse::synaptics/brightness"
++
+ /**
+ * Protocol-specific data.
+ */
+@@ -392,6 +394,37 @@
+ return 0;
+ }
+
++static void
++event_query_led(InputInfoPtr pInfo)
++{
++ SynapticsPrivate *priv = (SynapticsPrivate *)pInfo->private;
++
++ xf86IDrvMsg(pInfo, X_INFO, "led: checking for access to %s\n", SYNAPTICS_LED_SYS_FILE);
++ priv->synpara.has_led = !access(SYNAPTICS_LED_SYS_FILE, W_OK);
++ if (priv->synpara.has_led)
++ xf86IDrvMsg(pInfo, X_INFO, "led: access ok\n");
++ else
++ xf86IDrvMsg(pInfo, X_INFO, "led: no access\n");
++}
++
++static void EventUpdateLED(InputInfoPtr pInfo)
++{
++ SynapticsPrivate *priv = (SynapticsPrivate *)pInfo->private;
++
++ if (priv->synpara.has_led) {
++ char *val = priv->synpara.led_status ? "255" : "0";
++ int fd = open(SYNAPTICS_LED_SYS_FILE, O_WRONLY);
++ int err;
++
++ if (fd < 0)
++ return;
++ err = write(fd, val, strlen(val));
++ close(fd);
++ if (err < 0)
++ xf86IDrvMsg(pInfo, X_WARNING, "can't write LED value %s\n", val);
++ }
++}
++
+ /* Query device for axis ranges */
+ static void
+ event_query_axis_ranges(InputInfoPtr pInfo)
+@@ -928,6 +961,9 @@
+ event_query_model(pInfo->fd, &priv->model, &priv->id_vendor,
+ &priv->id_product);
+
++ event_query_led(pInfo);
++ event_query_model(pInfo->fd, &priv->model, &priv->id_vendor, &priv->id_product);
++
+ xf86IDrvMsg(pInfo, X_PROBED, "Vendor %#hx Product %#hx\n",
+ priv->id_vendor, priv->id_product);
+ }
+@@ -1007,5 +1043,6 @@
+ EventQueryHardware,
+ EventReadHwState,
+ EventAutoDevProbe,
+- EventReadDevDimensions
++ EventReadDevDimensions,
++ EventUpdateLED,
+ };
+diff -ur xf86-input-synaptics-1.7.6/src/properties.c xf86-input-synaptics-1.7.6_new/src/properties.c
+--- xf86-input-synaptics-1.7.6/src/properties.c 2014-05-01 08:18:12.000000000 +0400
++++ xf86-input-synaptics-1.7.6_new/src/properties.c 2015-10-29 11:40:12.047245599 +0300
+@@ -95,6 +95,9 @@
+ Atom prop_noise_cancellation = 0;
+ Atom prop_product_id = 0;
Atom prop_device_node = 0;
- Atom prop_led = 0;
- Atom prop_led_status = 0;
++Atom prop_led = 0;
++Atom prop_led_status = 0;
+Atom prop_led_double_tap = 0;
static Atom
InitTypedAtom(DeviceIntPtr dev, char *name, Atom type, int format, int nvalues,
-@@ -346,6 +347,8 @@ InitDeviceProperties(InputInfoPtr pInfo)
- prop_led = InitAtom(pInfo->dev, SYNAPTICS_PROP_LED, 8, 1, &para->has_led);
- prop_led_status = InitAtom(pInfo->dev, SYNAPTICS_PROP_LED_STATUS, 8, 1, &para->led_status);
+@@ -381,6 +384,11 @@
+ SYNAPTICS_PROP_NOISE_CANCELLATION, 32, 2,
+ values);
++ prop_led = InitAtom(pInfo->dev, SYNAPTICS_PROP_LED, 8, 1, &para->has_led);
++ prop_led_status = InitAtom(pInfo->dev, SYNAPTICS_PROP_LED_STATUS, 8, 1, &para->led_status);
++
+ prop_led_double_tap = InitAtom(pInfo->dev, SYNAPTICS_PROP_LED_DOUBLE_TAP, 8, 1, &para->led_double_tap);
+
/* only init product_id property if we actually know them */
if (priv->id_vendor || priv->id_product) {
values[0] = priv->id_vendor;
-@@ -720,6 +723,12 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
- priv->proto_ops->UpdateLED(pInfo);
- }
+@@ -814,6 +822,22 @@
+ para->hyst_x = hyst[0];
+ para->hyst_y = hyst[1];
}
++ else if (property == prop_led_status) {
++ if (prop->size != 1 || prop->format != 8 || prop->type != XA_INTEGER)
++ return BadMatch;
++
++ if (para->has_led) {
++ para->led_status = *(BOOL*)prop->data;
++ if (priv->proto_ops && priv->proto_ops->UpdateLED)
++ priv->proto_ops->UpdateLED(pInfo);
++ }
++ }
+ else if (property == prop_led_double_tap) {
+ if (prop->size != 1 || prop->format != 8 || prop->type != XA_INTEGER)
+ return BadMatch;
@@ -97,7 +174,7 @@ index 7de4a14..76038ec 100644
else if (property == prop_product_id || property == prop_device_node)
return BadValue; /* read-only */
else { /* unknown property */
-@@ -735,3 +744,14 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
+@@ -829,3 +853,14 @@
return Success;
}
@@ -112,11 +189,10 @@ index 7de4a14..76038ec 100644
+ XIChangeDeviceProperty(dev, prop_off, XA_INTEGER, 8,
+ PropModeReplace, 1, &val, FALSE);
+}
-diff --git a/src/synaptics.c b/src/synaptics.c
-index eb38271..83c6a67 100644
---- a/src/synaptics.c
-+++ b/src/synaptics.c
-@@ -141,6 +141,7 @@ static void SanitizeDimensions(InputInfoPtr pInfo);
+diff -ur xf86-input-synaptics-1.7.6/src/synaptics.c xf86-input-synaptics-1.7.6_new/src/synaptics.c
+--- xf86-input-synaptics-1.7.6/src/synaptics.c 2014-05-13 05:33:21.000000000 +0400
++++ xf86-input-synaptics-1.7.6_new/src/synaptics.c 2015-10-29 11:46:05.609365594 +0300
+@@ -143,6 +143,7 @@
void InitDeviceProperties(InputInfoPtr pInfo);
int SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
BOOL checkonly);
@@ -124,7 +200,7 @@ index eb38271..83c6a67 100644
const static struct {
const char *name;
-@@ -711,6 +712,8 @@ set_default_parameters(InputInfoPtr pInfo)
+@@ -745,6 +746,8 @@
xf86SetIntOption(opts, "HorizResolution", horizResolution);
pars->resolution_vert =
xf86SetIntOption(opts, "VertResolution", vertResolution);
@@ -133,7 +209,7 @@ index eb38271..83c6a67 100644
/* Warn about (and fix) incorrectly configured TopEdge/BottomEdge parameters */
if (pars->top_edge > pars->bottom_edge) {
-@@ -961,6 +964,10 @@ DeviceOn(DeviceIntPtr dev)
+@@ -1004,6 +1007,10 @@
xf86AddEnabledDevice(pInfo);
dev->public.on = TRUE;
@@ -144,7 +220,7 @@ index eb38271..83c6a67 100644
return Success;
}
-@@ -1306,6 +1313,100 @@ DeviceInit(DeviceIntPtr dev)
+@@ -1346,14 +1353,83 @@
return !Success;
}
@@ -217,35 +293,38 @@ index eb38271..83c6a67 100644
+}
+
+
-+/*
-+ * Convert from absolute X/Y coordinates to a coordinate system where
-+ * -1 corresponds to the left/upper edge and +1 corresponds to the
-+ * right/lower edge.
-+ */
-+static void
+ /*
+ * Convert from absolute X/Y coordinates to a coordinate system where
+ * -1 corresponds to the left/upper edge and +1 corresponds to the
+ * right/lower edge.
+ */
+ static void
+-relative_coords(SynapticsPrivate * priv, int x, int y,
+- double *relX, double *relY)
+relative_coords(SynapticsPrivate *priv, int x, int y,
+ double *relX, double *relY)
-+{
-+ int minX = priv->synpara.left_edge;
-+ int maxX = priv->synpara.right_edge;
-+ int minY = priv->synpara.top_edge;
-+ int maxY = priv->synpara.bottom_edge;
-+ double xCenter = (minX + maxX) / 2.0;
-+ double yCenter = (minY + maxY) / 2.0;
-+
-+ if ((maxX - xCenter > 0) && (maxY - yCenter > 0)) {
+ {
+ int minX = priv->synpara.left_edge;
+ int maxX = priv->synpara.right_edge;
+@@ -1363,12 +1439,11 @@
+ double yCenter = (minY + maxY) / 2.0;
+
+ if ((maxX - xCenter > 0) && (maxY - yCenter > 0)) {
+- *relX = (x - xCenter) / (maxX - xCenter);
+- *relY = (y - yCenter) / (maxY - yCenter);
+- }
+- else {
+- *relX = 0;
+- *relY = 0;
+ *relX = (x - xCenter) / (maxX - xCenter);
+ *relY = (y - yCenter) / (maxY - yCenter);
+ } else {
+ *relX = 0;
+ *relY = 0;
-+ }
-+}
-+
- /* return angle of point relative to center */
- static double
- angle(SynapticsPrivate * priv, int x, int y)
-@@ -1424,6 +1525,7 @@ timerFunc(OsTimerPtr timer, CARD32 now, pointer arg)
+ }
+ }
+
+@@ -1581,6 +1656,7 @@
{
InputInfoPtr pInfo = arg;
SynapticsPrivate *priv = (SynapticsPrivate *) (pInfo->private);
@@ -253,7 +332,7 @@ index eb38271..83c6a67 100644
struct SynapticsHwState *hw = priv->local_hw_state;
int delay;
int sigstate;
-@@ -1434,6 +1536,13 @@ timerFunc(OsTimerPtr timer, CARD32 now, pointer arg)
+@@ -1591,6 +1667,13 @@
SynapticsCopyHwState(hw, priv->hwState);
SynapticsResetTouchHwState(hw, FALSE);
delay = HandleState(pInfo, hw, hw->millis, TRUE);
@@ -267,25 +346,29 @@ index eb38271..83c6a67 100644
priv->timer_time = now;
priv->timer = TimerSet(priv->timer, 0, delay, timerFunc, pInfo);
-@@ -2566,7 +2675,7 @@ update_hw_button_state(const InputInfoPtr pInfo, struct SynapticsHwState *hw,
+@@ -2773,7 +2856,7 @@
/* If this is a clickpad and the user clicks in a soft button area, press
* the soft button instead. */
- if (para->clickpad) {
+ if (para->touchpad_off != 1 && para->clickpad) {
/* hw->left is down, but no other buttons were already down */
- if (!old->left && !old->right && !old->middle &&
- hw->left && !hw->right && !hw->middle) {
-@@ -2791,7 +2900,7 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now,
- Bool inside_active_area;
+ if (!(priv->lastButtons & 7) && hw->left && !hw->right && !hw->middle) {
+ /* If the finger down event is delayed, the x and y
+@@ -3072,6 +3155,12 @@
+ Bool using_cumulative_coords = FALSE;
+ Bool ignore_motion;
- /* If touchpad is switched off, we skip the whole thing and return delay */
-- if (para->touchpad_off == TOUCHPAD_OFF) {
++ /* If touchpad is switched off, we skip the whole thing and return delay */
+ if (para->touchpad_off == TOUCHPAD_OFF && !(para->has_led && para->led_double_tap)) {
- UpdateTouchState(pInfo, hw);
- return delay;
- }
-@@ -2846,6 +2955,15 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now,
++ UpdateTouchState(pInfo, hw);
++ return delay;
++ }
++
+ /* We need both and x/y, the driver can't handle just one of the two
+ * yet. But since it's possible to hit a phys button on non-clickpads
+ * without ever getting motion data first, we must continue with 0/0 for
+@@ -3143,6 +3232,15 @@
finger = priv->finger_state;
}
@@ -301,19 +384,20 @@ index eb38271..83c6a67 100644
/* tap and drag detection. Needs to be performed even if the finger is in
* the dead area to reset the state. */
timeleft = HandleTapProcessing(priv, hw, now, finger, inside_active_area);
-diff --git a/src/synapticsstr.h b/src/synapticsstr.h
-index c84e1b6..da8fb78 100644
---- a/src/synapticsstr.h
-+++ b/src/synapticsstr.h
-@@ -190,6 +190,7 @@ typedef struct _SynapticsParameters {
+diff -ur xf86-input-synaptics-1.7.6/src/synapticsstr.h xf86-input-synaptics-1.7.6_new/src/synapticsstr.h
+--- xf86-input-synaptics-1.7.6/src/synapticsstr.h 2014-05-01 08:18:12.000000000 +0400
++++ xf86-input-synaptics-1.7.6_new/src/synapticsstr.h 2015-10-29 11:47:04.671303525 +0300
+@@ -226,6 +226,9 @@
+ 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 has_led; /* has an embedded LED */
- Bool led_status; /* Current status of LED (1=on) */
++ Bool has_led; /* has an embedded LED */
++ Bool led_status; /* Current status of LED (1=on) */
+ Bool led_double_tap; /* double-tap period in ms for touchpad LED control */
} SynapticsParameters;
struct _SynapticsPrivateRec {
-@@ -267,6 +268,11 @@ struct _SynapticsPrivateRec {
+@@ -308,6 +311,11 @@
Bool has_width; /* device reports finger width */
Bool has_scrollbuttons; /* device has physical scrollbuttons */
Bool has_semi_mt; /* device is only semi-multitouch capable */
@@ -325,18 +409,34 @@ index c84e1b6..da8fb78 100644
enum TouchpadModel model; /* The detected model */
unsigned short id_vendor; /* vendor id */
-diff --git a/tools/synclient.c b/tools/synclient.c
-index f61ed45..1e6f33f 100644
---- a/tools/synclient.c
-+++ b/tools/synclient.c
-@@ -141,6 +141,7 @@ static struct Parameter params[] = {
+diff -ur xf86-input-synaptics-1.7.6/src/synproto.h xf86-input-synaptics-1.7.6_new/src/synproto.h
+--- xf86-input-synaptics-1.7.6/src/synproto.h 2014-05-13 05:33:21.000000000 +0400
++++ xf86-input-synaptics-1.7.6_new/src/synproto.h 2015-10-29 11:34:03.864805494 +0300
+@@ -31,6 +31,7 @@
+ #include "config.h"
+ #endif
+
++#include <xorg-server.h>
+ #include <unistd.h>
+ #include <sys/ioctl.h>
+ #include <xf86Xinput.h>
+@@ -103,6 +104,7 @@
+ struct SynapticsHwState * hwRet);
+ Bool (*AutoDevProbe) (InputInfoPtr pInfo, const char *device);
+ void (*ReadDevDimensions) (InputInfoPtr pInfo);
++ void (*UpdateLED)(InputInfoPtr pInfo);
+ };
+
+ #ifdef BUILD_PS2COMM
+diff -ur xf86-input-synaptics-1.7.6/tools/synclient.c xf86-input-synaptics-1.7.6_new/tools/synclient.c
+--- xf86-input-synaptics-1.7.6/tools/synclient.c 2014-03-20 03:18:02.000000000 +0400
++++ xf86-input-synaptics-1.7.6_new/tools/synclient.c 2015-10-29 11:47:25.371985080 +0300
+@@ -148,6 +148,8 @@
+ {"MiddleButtonAreaRight", PT_INT, INT_MIN, INT_MAX, SYNAPTICS_PROP_SOFTBUTTON_AREAS, 32, 5},
{"MiddleButtonAreaTop", PT_INT, INT_MIN, INT_MAX, SYNAPTICS_PROP_SOFTBUTTON_AREAS, 32, 6},
{"MiddleButtonAreaBottom", PT_INT, INT_MIN, INT_MAX, SYNAPTICS_PROP_SOFTBUTTON_AREAS, 32, 7},
- {"LEDStatus", PT_BOOL, 0, 1, SYNAPTICS_PROP_LED_STATUS, 8, 0},
++ {"LEDStatus", PT_BOOL, 0, 1, SYNAPTICS_PROP_LED_STATUS, 8, 0},
+ {"LEDDoubleTap", PT_BOOL, 0, 1, SYNAPTICS_PROP_LED_DOUBLE_TAP, 8, 0},
{ NULL, 0, 0, 0, 0 }
};
---
-1.8.2.3
-