[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-input-synaptics: Changes to 'upstream'



 configure.ac       |    2 +-
 src/eventcomm.c    |   45 ++++++++++++++++++++++++++++++---------------
 src/synaptics.c    |    6 +++++-
 src/synapticsstr.h |    3 ++-
 tools/synclient.c  |    2 +-
 5 files changed, 39 insertions(+), 19 deletions(-)

New commits:
commit b46ea23ab9f8db40880d294733debbe7a5ebcab7
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu May 28 09:46:18 2009 +1000

    synaptics 1.1.2

diff --git a/configure.ac b/configure.ac
index 0681873..ef85cb5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-input-synaptics],
-        1.1.1,
+        1.1.2,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-input-synaptics)
 

commit d4c64483f75af56f0b989798adb28487a76d926f
Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
Date:   Thu May 7 18:17:55 2009 +1000

    Add model-specific edges for appletouch.
    
    Needs around 8.5% to be useable.
    
    I created a table to iterate through the different products rather than
    using if/else branches.  I can enumerate the appletouch product_ids, but I
    suspect they will all be around the same range (hence the PRODUCT_ANY).  If
    another product id shows different behavior, we can just add an entry to
    the table as appropriate.
    
    I also changed the default eheight to be 5.4% to match the spec.
    
    Reported-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
    Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
    (cherry picked from commit c3ab0ae4f3f04da7018173662ede174c97710c8a)

diff --git a/src/eventcomm.c b/src/eventcomm.c
index 690d179..600fa29 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -115,22 +115,37 @@ event_query_is_touchpad(int fd)
     return TRUE;
 }
 
+typedef struct {
+	short vendor;
+	short product;
+	enum TouchpadModel model;
+} model_lookup_t;
+#define PRODUCT_ANY 0x0000
+
+static model_lookup_t model_lookup_table[] = {
+	{0x0002, 0x0007, MODEL_SYNAPTICS},
+	{0x0002, 0x0008, MODEL_ALPS},
+	{0x05ac, PRODUCT_ANY, MODEL_APPLETOUCH},
+	{0x0, 0x0, 0x0}
+};
+
 static void
 event_query_info(LocalDevicePtr local)
 {
     SynapticsPrivate *priv = (SynapticsPrivate *)local->private;
     short id[4];
     int rc;
+    model_lookup_t *model_lookup;
 
     SYSCALL(rc = ioctl(local->fd, EVIOCGID, id));
     if (rc < 0)
         return;
 
-    if (id[ID_VENDOR] == 0x2 && id[ID_PRODUCT] == 0x7)
-        priv->model = MODEL_SYNAPTICS;
-    else if (id[ID_VENDOR] == 0x2 && id[ID_PRODUCT] == 0x8)
-        priv->model = MODEL_ALPS;
-
+    for(model_lookup = model_lookup_table; model_lookup->vendor; model_lookup++) {
+        if(model_lookup->vendor == id[ID_VENDOR] &&
+           (model_lookup->product == id[ID_PRODUCT] || model_lookup->product == PRODUCT_ANY))
+            priv->model = model_lookup->model;
+    }
 }
 
 /* Query device for axis ranges */
diff --git a/src/synaptics.c b/src/synaptics.c
index 710c786..fdd7790 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -341,10 +341,14 @@ static void set_default_parameters(LocalDevicePtr local)
         {
             ewidth = width * .15;
             eheight = height * .15;
+        } else if (priv->model == MODEL_APPLETOUCH)
+        {
+            ewidth = width * .085;
+            eheight = height * .085;
         } else
         {
             ewidth = width * .04;
-            eheight = height * .04;
+            eheight = height * .054;
         }
 
         l = priv->minx + ewidth;
diff --git a/src/synapticsstr.h b/src/synapticsstr.h
index f518c11..d5a3f91 100644
--- a/src/synapticsstr.h
+++ b/src/synapticsstr.h
@@ -82,7 +82,8 @@ enum TapButtonState {
 enum TouchpadModel {
     MODEL_UNKNOWN = 0,
     MODEL_SYNAPTICS,
-    MODEL_ALPS
+    MODEL_ALPS,
+    MODEL_APPLETOUCH
 };
 
 typedef struct _SynapticsPrivateRec

commit 3b2c023ca64c20203973fc3e606ab91dfc65c16f
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue May 19 08:43:57 2009 +1000

    synaptics 1.1.1

diff --git a/configure.ac b/configure.ac
index edbcc05..0681873 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-input-synaptics],
-        1.1.0,
+        1.1.1,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-input-synaptics)
 

commit 553106362973f4938e0a03a4178c97b0ce0ff0f1
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue May 19 08:43:29 2009 +1000

    synclient: up max value for AccelFactor to 1.0
    
    There's no real reason to restrict AccelFactor to 0.2, the driver itself
    doesn't restrict AccelFactor either. Upwards of 1.0 it's hard to spot any
    real differences in speed though, so 1.0 seems like a sensible maximum.
    
    Red Hat Bug 462574 <https://bugzilla.redhat.com/show_bug.cgi?id=462574>
    
    Reported-by: David Woodhouse <dwmw2@infradead.org>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
    (cherry picked from commit 35191ec094a2006ba290713640dd95c88ca3b0f9)
    
    Conflicts:
    
    	tools/synclient.c

diff --git a/tools/synclient.c b/tools/synclient.c
index 2ebd458..99d83f0 100644
--- a/tools/synclient.c
+++ b/tools/synclient.c
@@ -131,7 +131,7 @@ static struct Parameter params[] = {
 		SYNAPTICS_PROP_SPEED,		0, /*float */	0),
     DEFINE_PAR("MaxSpeed",             max_speed,               PT_DOUBLE, 0, 1.0,
 		SYNAPTICS_PROP_SPEED,		0, /*float */	1),
-    DEFINE_PAR("AccelFactor",          accl,                    PT_DOUBLE, 0, 0.2,
+    DEFINE_PAR("AccelFactor",          accl,                    PT_DOUBLE, 0, 1.0,
 		SYNAPTICS_PROP_SPEED,		0, /*float */	2),
     DEFINE_PAR("TrackstickSpeed",      trackstick_speed,        PT_DOUBLE, 0, 200.0,
 		SYNAPTICS_PROP_SPEED,		0, /*float */ 3),

commit 4b12887fbd4ae82196b4e64beef0118905c5aa38
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri May 15 11:59:58 2009 +1000

    eventcomm: force boolean values for has_left, has_right, etc.
    
    TEST_BIT simply returns the value of the bytes, so we end up with has_left
    and friends being an integer value instead of a boolean value. This again
    may cause confusion in other parts, if a 1/0 boolean value is expected (e.g.
    all xf86SetBoolOption()).
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
    (cherry picked from commit e0d651c77e3a59086d5f36d1aaf9e6ba80394336)

diff --git a/src/eventcomm.c b/src/eventcomm.c
index 5b38c28..690d179 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -202,15 +202,15 @@ event_query_axis_ranges(LocalDevicePtr local)
     if (rc >= 0)
     {
 	buf[0] = 0;
-	if ((priv->has_left = TEST_BIT(BTN_LEFT, keybits)))
+	if ((priv->has_left = (TEST_BIT(BTN_LEFT, keybits) != 0)))
 	   strcat(buf, " left");
-	if ((priv->has_right = TEST_BIT(BTN_RIGHT, keybits)))
+	if ((priv->has_right = (TEST_BIT(BTN_RIGHT, keybits) != 0)))
 	   strcat(buf, " right");
-	if ((priv->has_middle = TEST_BIT(BTN_MIDDLE, keybits)))
+	if ((priv->has_middle = (TEST_BIT(BTN_MIDDLE, keybits) != 0)))
 	   strcat(buf, " middle");
-	if ((priv->has_double = TEST_BIT(BTN_TOOL_DOUBLETAP, keybits)))
+	if ((priv->has_double = (TEST_BIT(BTN_TOOL_DOUBLETAP, keybits) != 0)))
 	   strcat(buf, " double");
-	if ((priv->has_triple = TEST_BIT(BTN_TOOL_TRIPLETAP, keybits)))
+	if ((priv->has_triple = (TEST_BIT(BTN_TOOL_TRIPLETAP, keybits) != 0)))
 	   strcat(buf, " triple");
 	xf86Msg(X_INFO, "%s: buttons:%s\n", local->name, buf);
     }

commit 372ab4c9b66e3d267e35275d3d2597cdb594ed73
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Mar 24 11:24:02 2009 +1000

    Shut up valgrind warnings about uninitialized variables.
    
    Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 18442d927f6cf03e7a366f6c3c0292b065ba1c64)

diff --git a/src/eventcomm.c b/src/eventcomm.c
index 3b03695..5b38c28 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -78,9 +78,9 @@ static Bool
 event_query_is_touchpad(int fd)
 {
     int ret;
-    unsigned long evbits[NBITS(EV_MAX)];
-    unsigned long absbits[NBITS(ABS_MAX)];
-    unsigned long keybits[NBITS(KEY_MAX)];
+    unsigned long evbits[NBITS(EV_MAX)] = {0};
+    unsigned long absbits[NBITS(ABS_MAX)] = {0};
+    unsigned long keybits[NBITS(KEY_MAX)] = {0};
 
     /* Check for ABS_X, ABS_Y, ABS_PRESSURE and BTN_TOOL_FINGER */
 
@@ -139,8 +139,8 @@ event_query_axis_ranges(LocalDevicePtr local)
 {
     SynapticsPrivate *priv = (SynapticsPrivate *)local->private;
     struct input_absinfo abs;
-    unsigned long absbits[NBITS(ABS_MAX)];
-    unsigned long keybits[NBITS(KEY_MAX)];
+    unsigned long absbits[NBITS(ABS_MAX)] = {0};
+    unsigned long keybits[NBITS(KEY_MAX)] = {0};
     char buf[256];
     int rc;
 


Reply to: