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

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



Rebased ref, commits from common ancestor:
commit 96cf04dce19e7c90bc05b8b3b192b5bfb97381d2
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon May 13 10:03:48 2013 +1000

    synaptics 1.7.1
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/configure.ac b/configure.ac
index b8a75cd..5dfbc4e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-input-synaptics],
-        [1.7.0],
+        [1.7.1],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-input-synaptics])
 AC_CONFIG_SRCDIR([Makefile.am])

commit 3bd40423b26ab692174ddcdd12489467ba876926
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu May 9 11:09:51 2013 +1000

    Plug memory leak for priv->touch_axes
    
    Allocated in event_query_touch, was never freed.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Dave Airlie <airlied@redhat.com>

diff --git a/src/synaptics.c b/src/synaptics.c
index d4b21a9..eb38271 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -1035,6 +1035,8 @@ DeviceClose(DeviceIntPtr dev)
     RetValue = DeviceOff(dev);
     TimerFree(priv->timer);
     priv->timer = NULL;
+    free(priv->touch_axes);
+    priv->touch_axes = NULL;
     SynapticsHwStateFree(&priv->hwState);
     SynapticsHwStateFree(&priv->old_hw_state);
     SynapticsHwStateFree(&priv->local_hw_state);

commit eb50f8023e9ce11c3f0249ef9ddf398a1d983c84
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu May 9 11:06:12 2013 +1000

    Plug memory leak for option_string
    
    xf86SetStrOption() returns a strdup'd string that must be freed after use.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Dave Airlie <airlied@redhat.com>

diff --git a/src/synaptics.c b/src/synaptics.c
index 2de05d4..d4b21a9 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -513,12 +513,15 @@ set_softbutton_areas_option(InputInfoPtr pInfo)
     memcpy(pars->softbutton_areas[0], values, 4 * sizeof(int));
     memcpy(pars->softbutton_areas[1], values + 4, 4 * sizeof(int));
 
+    free(option_string);
+
     return;
 
  fail:
     xf86IDrvMsg(pInfo, X_ERROR,
                 "invalid SoftButtonAreas value '%s', keeping defaults\n",
                 option_string);
+    free(option_string);
 }
 
 static void

commit 7cc0ebf0858ebb505d933839f25bb269a8cdb764
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Apr 26 10:09:10 2013 +1000

    Fix stack smash in clickpad_guess_clickfingers()
    
    Apple Magic Trackpad can report 16 slots. In clickpad_guess_clickfingers()
    the array allocated on the stack contains only 10 slots.
    As (.num_mt_mask == .num_slots), the function writes out of the bounds
    of close_point.
    
    Use a size 32 bitmask instead and warn if we ever get past 32 touchpoints.
    
    This fixes:
    https://bugzilla.redhat.com/show_bug.cgi?id=952221
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reported-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

diff --git a/src/synaptics.c b/src/synaptics.c
index f0a8269..2de05d4 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -2453,10 +2453,11 @@ clickpad_guess_clickfingers(SynapticsPrivate * priv,
                             struct SynapticsHwState *hw)
 {
     int nfingers = 0;
-    char close_point[SYNAPTICS_MAX_TOUCHES] = { 0 };    /* 1 for each point close
-                                                           to another one */
+    uint32_t close_point = 0; /* 1 bit for each point close to another one */
     int i, j;
 
+    BUG_RETURN_VAL(hw->num_mt_mask > sizeof(close_point) * 8, 0);
+
     for (i = 0; i < hw->num_mt_mask - 1; i++) {
         ValuatorMask *f1;
 
@@ -2488,14 +2489,16 @@ clickpad_guess_clickfingers(SynapticsPrivate * priv,
              * size. Good luck. */
             if (abs(x1 - x2) < (priv->maxx - priv->minx) * .3 &&
                 abs(y1 - y2) < (priv->maxy - priv->miny) * .3) {
-                close_point[j] = 1;
-                close_point[i] = 1;
+                close_point |= (1 << j);
+                close_point |= (1 << i);
             }
         }
     }
 
-    for (i = 0; i < SYNAPTICS_MAX_TOUCHES; i++)
-        nfingers += close_point[i];
+    while (close_point > 0) {
+        nfingers += close_point & 0x1;
+        close_point >>= 1;
+    }
 
     return nfingers;
 }

commit ac47b4ea5b4f7b920b84a1e70adce3475e3be346
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Apr 3 10:50:50 2013 +1000

    Allow soft button areas to overlap on the edge
    
    For percent-based configuration in the form of
    middle button 33%-66%, right button 66%-0 we'd get an error because of the
    one device unit overlap. This was neither documented nor useful, because
    leaving a 1% gap leaves an actual gap between the buttons. Allow for an
    overlap of one device unit on the edge of the buttons.
    
    What's picked in that case depends on the implementation of
    is_inside_softbutton_area but since one device unit is so small, it doesn't
    matter.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/man/synaptics.man b/man/synaptics.man
index 2b7b7b9..079a5f8 100644
--- a/man/synaptics.man
+++ b/man/synaptics.man
@@ -443,7 +443,8 @@ bottom edge of the middle button, respectively. Any of the values may be
 given as percentage of the touchpad width or height, whichever applies.
 If any edge is set to 0 (not 0%), the button is assumed to extend to
 infinity in the given direction. Setting all values to 0 (not 0%) disables
-soft button areas.
+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"
 .
 
diff --git a/src/synaptics.c b/src/synaptics.c
index 3437d9d..f0a8269 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -421,13 +421,13 @@ SynapticsIsSoftButtonAreasValid(int *values)
         if ((right_bottom <= middle_bottom && right_bottom >= middle_top) ||
             (right_top <= middle_bottom && right_top >= middle_top)) {
             /* Check for overlapping left edges */
-            if ((right_left < middle_left && right_right >= middle_left) ||
-                (middle_left < right_left && middle_right >= right_left))
+            if ((right_left < middle_left && right_right > middle_left) ||
+                (middle_left < right_left && middle_right > right_left))
                 return FALSE;
 
             /* Check for overlapping right edges */
-            if ((right_right > middle_right && right_left <= middle_right) ||
-                (middle_right > right_right && middle_left <= right_right))
+            if ((right_right > middle_right && right_left < middle_right) ||
+                (middle_right > right_right && middle_left < right_right))
                 return FALSE;
         }
 
@@ -435,13 +435,13 @@ SynapticsIsSoftButtonAreasValid(int *values)
         if ((right_left >= middle_left && right_left <= middle_right) ||
             (right_right >= middle_left && right_right <= middle_right)) {
             /* Check for overlapping top edges */
-            if ((right_top < middle_top && right_bottom >= middle_top) ||
-                (middle_top < right_top && middle_bottom >= right_top))
+            if ((right_top < middle_top && right_bottom > middle_top) ||
+                (middle_top < right_top && middle_bottom > right_top))
                 return FALSE;
 
             /* Check for overlapping bottom edges */
-            if ((right_bottom > middle_bottom && right_top <= middle_bottom) ||
-                (middle_bottom > right_bottom && middle_top <= right_bottom))
+            if ((right_bottom > middle_bottom && right_top < middle_bottom) ||
+                (middle_bottom > right_bottom && middle_top < right_bottom))
                 return FALSE;
         }
     }

commit 368d96f4dfd4605b80d039ec4508c906c3723cf7
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Apr 3 10:50:21 2013 +1000

    man: clarify that 0, not 0% disables the softbutton area
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/man/synaptics.man b/man/synaptics.man
index 03f18ac..2b7b7b9 100644
--- a/man/synaptics.man
+++ b/man/synaptics.man
@@ -441,8 +441,9 @@ The first four parameters are the left, right, top, bottom edge of the right
 button, respectively, the second four parameters are the left, right, top,
 bottom edge of the middle button, respectively. Any of the values may be
 given as percentage of the touchpad width or height, whichever applies.
-If any edge is set to 0, the button is assumed to extend to infinity in the
-given direction. Setting all values to 0 disables soft button areas.
+If any edge is set to 0 (not 0%), the button is assumed to extend to
+infinity in the given direction. Setting all values to 0 (not 0%) disables
+soft button areas.
 Property: "Synaptics Soft Button Areas"
 .
 

commit 148afc2dd55bb5d256d8b251542c90bcca7aaf84
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Apr 3 10:34:28 2013 +1000

    Improve readability of the soft button areas
    
    Replace the hardcoded indices with enums that are somewhat expressive.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/synaptics.c b/src/synaptics.c
index df092c0..3437d9d 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -367,42 +367,55 @@ SynapticsIsSoftButtonAreasValid(int *values)
     Bool right_disabled = FALSE;
     Bool middle_disabled = FALSE;
 
+    enum {
+        /* right button left, right, top, bottom */
+        RBL = 0,
+        RBR = 1,
+        RBT = 2,
+        RBB = 3,
+        /* middle button left, right, top, bottom */
+        MBL = 4,
+        MBR = 5,
+        MBT = 6,
+        MBB = 7,
+    };
+
     /* Check right button area */
-    if ((((values[0] != 0) && (values[1] != 0)) && (values[0] > values[1])) ||
-        (((values[2] != 0) && (values[3] != 0)) && (values[2] > values[3])))
+    if ((((values[RBL] != 0) && (values[RBR] != 0)) && (values[RBL] > values[RBR])) ||
+        (((values[RBT] != 0) && (values[RBB] != 0)) && (values[RBT] > values[RBB])))
         return FALSE;
 
     /* Check middle button area */
-    if ((((values[4] != 0) && (values[5] != 0)) && (values[4] > values[5])) ||
-        (((values[6] != 0) && (values[7] != 0)) && (values[6] > values[7])))
+    if ((((values[MBL] != 0) && (values[MBR] != 0)) && (values[MBL] > values[MBR])) ||
+        (((values[MBT] != 0) && (values[MBB] != 0)) && (values[MBT] > values[MBB])))
         return FALSE;
 
-    if (values[0] == 0 && values[1] == 0 && values[2] == 0 && values[3] == 0)
+    if (values[RBL] == 0 && values[RBR] == 0 && values[RBT] == 0 && values[RBB] == 0)
         right_disabled = TRUE;
 
-    if (values[4] == 0 && values[5] == 0 && values[6] == 0 && values[7] == 0)
+    if (values[MBL] == 0 && values[MBR] == 0 && values[MBT] == 0 && values[MBB] == 0)
         middle_disabled = TRUE;
 
     if (!right_disabled &&
-        ((values[0] && values[0] == values[1]) ||
-         (values[2] && values[2] == values[3])))
+        ((values[RBL] && values[RBL] == values[RBR]) ||
+         (values[RBT] && values[RBT] == values[RBB])))
         return FALSE;
 
     if (!middle_disabled &&
-        ((values[4] && values[4] == values[5]) ||
-         (values[6] && values[6] == values[7])))
+        ((values[MBL] && values[MBL] == values[MBR]) ||
+         (values[MBT] && values[MBT] == values[MBB])))
         return FALSE;
 
     /* Check for overlapping button areas */
     if (!right_disabled && !middle_disabled) {
-        int right_left = values[0] ? values[0] : INT_MIN;
-        int right_right = values[1] ? values[1] : INT_MAX;
-        int right_top = values[2] ? values[2] : INT_MIN;
-        int right_bottom = values[3] ? values[3] : INT_MAX;
-        int middle_left = values[4] ? values[4] : INT_MIN;
-        int middle_right = values[5] ? values[5] : INT_MAX;
-        int middle_top = values[6] ? values[6] : INT_MIN;
-        int middle_bottom = values[7] ? values[7] : INT_MAX;
+        int right_left = values[RBL] ? values[RBL] : INT_MIN;
+        int right_right = values[RBR] ? values[RBR] : INT_MAX;
+        int right_top = values[RBT] ? values[RBT] : INT_MIN;
+        int right_bottom = values[RBB] ? values[RBB] : INT_MAX;
+        int middle_left = values[MBL] ? values[MBL] : INT_MIN;
+        int middle_right = values[MBR] ? values[MBR] : INT_MAX;
+        int middle_top = values[MBT] ? values[MBT] : INT_MIN;
+        int middle_bottom = values[MBB] ? values[MBB] : INT_MAX;
 
         /* If areas overlap in the Y axis */
         if ((right_bottom <= middle_bottom && right_bottom >= middle_top) ||
@@ -1360,23 +1373,30 @@ is_inside_button_area(SynapticsParameters * para, int which, int x, int y)
 {
     Bool inside_area = TRUE;
 
-    if (para->softbutton_areas[which][0] == 0 &&
-        para->softbutton_areas[which][1] == 0 &&
-        para->softbutton_areas[which][2] == 0 &&
-        para->softbutton_areas[which][3] == 0)
+    enum {
+        LEFT = 0,
+        RIGHT = 1,
+        TOP = 2,
+        BOTTOM = 3
+    };
+
+    if (para->softbutton_areas[which][LEFT] == 0 &&
+        para->softbutton_areas[which][RIGHT] == 0 &&
+        para->softbutton_areas[which][TOP] == 0 &&
+        para->softbutton_areas[which][BOTTOM] == 0)
         return FALSE;
 
-    if (para->softbutton_areas[which][0] &&
-        x < para->softbutton_areas[which][0])
+    if (para->softbutton_areas[which][LEFT] &&
+        x < para->softbutton_areas[which][LEFT])
         inside_area = FALSE;
-    else if (para->softbutton_areas[which][1] &&
-             x > para->softbutton_areas[which][1])
+    else if (para->softbutton_areas[which][RIGHT] &&
+             x > para->softbutton_areas[which][RIGHT])
         inside_area = FALSE;
-    else if (para->softbutton_areas[which][2] &&
-             y < para->softbutton_areas[which][2])
+    else if (para->softbutton_areas[which][TOP] &&
+             y < para->softbutton_areas[which][TOP])
         inside_area = FALSE;
-    else if (para->softbutton_areas[which][3] &&
-             y > para->softbutton_areas[which][3])
+    else if (para->softbutton_areas[which][BOTTOM] &&
+             y > para->softbutton_areas[which][BOTTOM])
         inside_area = FALSE;
 
     return inside_area;

commit 691e8db4d8a5e35eb31f62d1e54523917e2830cd
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Apr 2 13:12:09 2013 +1000

    synaptics 1.7.0
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/configure.ac b/configure.ac
index 13644d2..b8a75cd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-input-synaptics],
-        [1.6.99],
+        [1.7.0],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-input-synaptics])
 AC_CONFIG_SRCDIR([Makefile.am])

commit 43e98fe4909dbb1b82b486f2831a38d9db0c8957
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Mar 26 15:26:42 2013 +1000

    synclient: use a parameter that actually exists in the man page example
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/man/synclient.man b/man/synclient.man
index ec3856c..8eb20de 100644
--- a/man/synclient.man
+++ b/man/synclient.man
@@ -33,9 +33,9 @@ Set user parameter \fIvar\fR to \fIvalue\fR.
 \fI/etc/X11/xorg.conf\fP
 .SH "EXAMPLES"
 .LP
-To disable EdgeMotionSpeed:
+To disable EdgeMotionMinSpeed:
 .LP
-synclient EdgeMotionSpeed=0
+synclient EdgeMotionMinSpeed=0
 .SH "AUTHORS"
 .LP
 Peter Osterlund <petero2@telia.com> and many others.

commit 5b49e4ad6cead80679405933603ff99ac00089b7
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Mar 26 15:24:56 2013 +1000

    synclient: drop XF86Config-4 from man page
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/man/synclient.man b/man/synclient.man
index 291ce30..ec3856c 100644
--- a/man/synclient.man
+++ b/man/synclient.man
@@ -31,8 +31,6 @@ Set user parameter \fIvar\fR to \fIvalue\fR.
 .SH "FILES"
 .LP
 \fI/etc/X11/xorg.conf\fP
-.LP
-\fI/etc/X11/XF86Config\-4\fP
 .SH "EXAMPLES"
 .LP
 To disable EdgeMotionSpeed:

commit 109ce14ae11f6a6afb66ddc683c7071ebbf9d352
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Mar 26 15:21:54 2013 +1000

    syndaemon: list -? in help/man page
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/man/syndaemon.man b/man/syndaemon.man
index a9d69b0..87691d8 100644
--- a/man/syndaemon.man
+++ b/man/syndaemon.man
@@ -61,6 +61,10 @@ Like \-k but also ignore Modifier+Key combos.
 \fB\-R\fP
 Use the XRecord extension for detecting keyboard activity instead of polling
 the keyboard state.
+.LP
+.TP
+\fB\-?\fP
+Show the help message.
 .SH "ENVIRONMENT VARIABLES"
 .LP
 .TP
diff --git a/tools/syndaemon.c b/tools/syndaemon.c
index 50b7435..29e75f5 100644
--- a/tools/syndaemon.c
+++ b/tools/syndaemon.c
@@ -88,6 +88,7 @@ usage(void)
     fprintf(stderr, "  -K Like -k but also ignore Modifier+Key combos.\n");
     fprintf(stderr, "  -R Use the XRecord extension.\n");
     fprintf(stderr, "  -v Print diagnostic messages.\n");
+    fprintf(stderr, "  -? Show this help message.\n");
     exit(1);
 }
 
@@ -576,6 +577,7 @@ main(int argc, char *argv[])
         case 'v':
             verbose = 1;
             break;
+        case '?':
         default:
             usage();
             break;

commit eb5f086f29ed5e45cbbaad73a04a7275ab119d03
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Mar 26 15:18:03 2013 +1000

    synclient: support -? for usage
    
    man page and help claim we support this, so let's do so
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/tools/synclient.c b/tools/synclient.c
index bb9be01..bd7cb61 100644
--- a/tools/synclient.c
+++ b/tools/synclient.c
@@ -483,7 +483,7 @@ main(int argc, char *argv[])
         dump_settings = 1;
 
     /* Parse command line parameters */
-    while ((c = getopt(argc, argv, "lV")) != -1) {
+    while ((c = getopt(argc, argv, "lV?")) != -1) {
         switch (c) {
         case 'l':
             dump_settings = 1;
@@ -491,6 +491,7 @@ main(int argc, char *argv[])
         case 'V':
             printf("%s\n", VERSION);
             exit(0);
+        case '?':
         default:
             usage();
         }

commit d0590052873d6ce7c28e6e99b6aad33cf6dff944
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Mar 26 15:13:06 2013 +1000

    synclient: remove 'm' and 'h' from getopt and man page
    
    Removed as of 83d88b253139f9c92d619e7ad7c3981138893536
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/man/synclient.man b/man/synclient.man
index 5938a32..291ce30 100644
--- a/man/synclient.man
+++ b/man/synclient.man
@@ -6,79 +6,16 @@
 synclient \- commandline utility to query and modify Synaptics driver
 options.
 .SH "SYNOPSIS"
-.LP
-synclient [\fI\-m interval\fP]
 .br
-synclient [\fI\-hlV?\fP] [var1=value1 [var2=value2] ...]
+synclient [\fI\-lV?\fP] [var1=value1 [var2=value2] ...]
 .SH "DESCRIPTION"
 .LP
 This program lets you change your Synaptics TouchPad driver for
 XOrg/XFree86 server parameters while X is running. 
 
-For the -m and -h options, SHM must be enabled by setting the option SHMConfig
-"on" in your XOrg/XFree86 configuration.
 .SH "OPTIONS"
 .LP
 .TP
-\fB\-m interval\fR
-monitor changes to the touchpad state.
-.
-Interval specifies how often (in ms) to poll the touchpad state.
-.
-Whenever a change in the touchpad state is detected, one line of
-output is generated that describes the current state of the touchpad.
-This option is only available in SHM mode.
-.
-The following data is included in the output.
-.RS
-.TP
-\fBtime\fR
-Time in seconds since the logging was started.
-.TP
-\fBx,y\fR
-The x/y coordinates of the finger on the touchpad.
-.
-The origin is in the upper left corner.
-.TP
-\fBz\fR
-The "pressure" value.
-.
-Pressing the finger harder on the touchpad typically produces a larger
-value.
-.
-Note that most touchpads don't measure the real pressure though.
-.
-Instead, capacitance is usually measured, which is correlated to the
-contact area between the finger and the touchpad.
-.
-Since more pressure usually means a larger contact area, the reported
-pressure value is at least indirectly related to the real pressure.
-.TP
-\fBf\fR
-The number of fingers currently touching the touchpad.
-.
-Note that only some touchpads can report more than one finger.
-.
-Generally, synaptics touchpads can, but ALPS touchpads can't.
-.TP
-\fBw\fR
-The w value is a measurement of the finger width.
-.
-This is only supported by some synaptics touchpads.
-.
-Touchpads that can't measure the finger width typically report a faked
-constant value when a finger is touching the touchpad.
-.TP
-\fBl,r,u,d,m,multi\fR
-The state of the left, right, up, down, middle and multi buttons.
-.
-Zero means not pressed, one means pressed.
-.
-Not all touchpads have all these buttons.
-.
-If a button doesn't exist, the value is always reported as 0.
-.RE
-.TP
 \fB\-l\fR
 List current user settings. This is the default if no option is given.
 .TP
@@ -91,7 +28,6 @@ Show the help message.
 \fBvar=value\fR
 Set user parameter \fIvar\fR to \fIvalue\fR.
 
-
 .SH "FILES"
 .LP
 \fI/etc/X11/xorg.conf\fP
@@ -102,10 +38,6 @@ Set user parameter \fIvar\fR to \fIvalue\fR.
 To disable EdgeMotionSpeed:
 .LP
 synclient EdgeMotionSpeed=0
-.LP
-To monitor touchpad events (requires SHM):
-.LP
-synclient \-m 100
 .SH "AUTHORS"
 .LP
 Peter Osterlund <petero2@telia.com> and many others.
diff --git a/tools/synclient.c b/tools/synclient.c
index b6ea2e6..bb9be01 100644
--- a/tools/synclient.c
+++ b/tools/synclient.c
@@ -483,7 +483,7 @@ main(int argc, char *argv[])
         dump_settings = 1;
 
     /* Parse command line parameters */
-    while ((c = getopt(argc, argv, "m:hlV")) != -1) {
+    while ((c = getopt(argc, argv, "lV")) != -1) {
         switch (c) {
         case 'l':
             dump_settings = 1;

commit d771cf75b101a741e29ba0765050936f52f1bca2
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Mar 26 15:12:29 2013 +1000

    tools: drop -s listing in synclient's help output. SHM is gone.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/tools/synclient.c b/tools/synclient.c
index 6239617..b6ea2e6 100644
--- a/tools/synclient.c
+++ b/tools/synclient.c
@@ -461,7 +461,7 @@ dp_show_settings(Display * dpy, XDevice * dev)
 static void
 usage(void)
 {
-    fprintf(stderr, "Usage: synclient [-s] [-h] [-l] [-V] [-?] [var1=value1 [var2=value2] ...]\n");
+    fprintf(stderr, "Usage: synclient [-h] [-l] [-V] [-?] [var1=value1 [var2=value2] ...]\n");
     fprintf(stderr, "  -l List current user settings\n");
     fprintf(stderr, "  -V Print synclient version string and exit\n");
     fprintf(stderr, "  -? Show this help message\n");
@@ -483,7 +483,7 @@ main(int argc, char *argv[])
         dump_settings = 1;
 
     /* Parse command line parameters */
-    while ((c = getopt(argc, argv, "sm:hlV")) != -1) {
+    while ((c = getopt(argc, argv, "m:hlV")) != -1) {
         switch (c) {
         case 'l':
             dump_settings = 1;

commit 43575f387865007e7ab3ed45088add62b674318d
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Mar 25 16:49:05 2013 +1000

    eventcomm: print axis resolution to the log
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/eventcomm.c b/src/eventcomm.c
index 6f4d2a5..258a538 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -445,10 +445,10 @@ event_query_axis_ranges(InputInfoPtr pInfo)
     }
 
     /* Now print the device information */
-    xf86IDrvMsg(pInfo, X_PROBED, "x-axis range %d - %d\n",
-                priv->minx, priv->maxx);
-    xf86IDrvMsg(pInfo, X_PROBED, "y-axis range %d - %d\n",
-                priv->miny, priv->maxy);
+    xf86IDrvMsg(pInfo, X_PROBED, "x-axis range %d - %d (res %d)\n",
+                priv->minx, priv->maxx, priv->resx);
+    xf86IDrvMsg(pInfo, X_PROBED, "y-axis range %d - %d (res %d)\n",
+                priv->miny, priv->maxy, priv->resy);
     if (priv->has_pressure)
         xf86IDrvMsg(pInfo, X_PROBED, "pressure range %d - %d\n",
                     priv->minp, priv->maxp);

commit 4cdee40054b2d6e222a7efb427f0f35479c04ec3
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Jan 31 09:27:19 2013 +1000

    Replace numerical values with an enum for the TouchpadOff prop
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/synaptics.c b/src/synaptics.c
index 29e551a..df092c0 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -650,7 +650,7 @@ set_default_parameters(InputInfoPtr pInfo)
         xf86SetBoolOption(opts, "VertTwoFingerScroll", vertTwoFingerScroll);
     pars->scroll_twofinger_horiz =
         xf86SetBoolOption(opts, "HorizTwoFingerScroll", horizTwoFingerScroll);
-    pars->touchpad_off = xf86SetIntOption(opts, "TouchpadOff", 0);
+    pars->touchpad_off = xf86SetIntOption(opts, "TouchpadOff", TOUCHPAD_ON);
     pars->locked_drags = xf86SetBoolOption(opts, "LockedDrags", FALSE);
     pars->locked_drag_time = xf86SetIntOption(opts, "LockedDragTimeout", 5000);
     pars->tap_action[RT_TAP] = xf86SetIntOption(opts, "RTCornerButton", 0);
@@ -1629,7 +1629,7 @@ SelectTapButton(SynapticsPrivate * priv, enum EdgeType edge)
 {
     enum TapEvent tap;
 
-    if (priv->synpara.touchpad_off == 2) {
+    if (priv->synpara.touchpad_off == TOUCHPAD_TAP_OFF) {
         priv->tap_button = 0;
         return;
     }
@@ -2171,7 +2171,7 @@ HandleScrolling(SynapticsPrivate * priv, struct SynapticsHwState *hw,
     SynapticsParameters *para = &priv->synpara;
     int delay = 1000000000;
 
-    if ((priv->synpara.touchpad_off == 2) || (priv->finger_state == FS_BLOCKED)) {
+    if ((priv->synpara.touchpad_off == TOUCHPAD_TAP_OFF) || (priv->finger_state == FS_BLOCKED)) {
         stop_coasting(priv);
         priv->circ_scroll_on = FALSE;
         priv->vert_scroll_edge_on = FALSE;
@@ -2763,7 +2763,7 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now,
     Bool inside_active_area;
 
     /* If touchpad is switched off, we skip the whole thing and return delay */
-    if (para->touchpad_off == 1) {
+    if (para->touchpad_off == TOUCHPAD_OFF) {
         UpdateTouchState(pInfo, hw);
         return delay;
     }
diff --git a/src/synapticsstr.h b/src/synapticsstr.h
index f6cbb4a..428befa 100644
--- a/src/synapticsstr.h
+++ b/src/synapticsstr.h
@@ -47,6 +47,12 @@
 #define SYNAPTICS_MAX_TOUCHES	10
 #define SYN_MAX_BUTTONS 12      /* Max number of mouse buttons */
 
+enum OffState {
+    TOUCHPAD_ON = 0,
+    TOUCHPAD_OFF = 1,
+    TOUCHPAD_TAP_OFF = 2,
+};
+
 enum TapEvent {
     RT_TAP = 0,                 /* Right top corner */
     RB_TAP,                     /* Right bottom corner */

commit 2159b5d26207c83efea6efca7fa5765df95a4219
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Jan 4 16:08:47 2013 +1000

    conf: add example for AreaBottomEdge on clickpad buttons
    
    Those that use clickpad buttons as buttons can see cursor jumps as the press
    on the touchpad - largely caused by the finger changing shape as the
    pressure changes and thus moving the hotspot.
    
    Simple fix is to define the clickpad soft button areas as dead areas, but
    this cannot be set as general option as it would break for those that use
    tapping.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/conf/50-synaptics.conf b/conf/50-synaptics.conf
index 9e86a7a..dd16ca2 100644
--- a/conf/50-synaptics.conf
+++ b/conf/50-synaptics.conf
@@ -32,6 +32,9 @@ Section "InputClass"
         Identifier "Default clickpad buttons"
         MatchDriver "synaptics"
         Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
+#       To disable the bottom edge area so the buttons only work as buttons,
+#       not for movement, set the AreaBottomEdge
+#       Option "AreaBottomEdge" "82%"
 EndSection
 
 # This option disables software buttons on Apple touchpads.

commit ce7565ea6683f594f1f2ab5769bf60b1337d70bd
Author: Daniel Stone <daniel@fooishbar.org>
Date:   Sat Dec 29 03:24:52 2012 +0000

    Free mtdev device as well as closing it
    
    mtdev_close_delete() is to mtdev_new_open() as mtdev_close() is to
    mtdev_open().  So, since we're using mtdev_new_open(), we need to use
    mtdev_close_delete() instead of just mtdev_close() to actually free
    everything.
    
    Fixes an eventual failure to open the touchpad device after a lot of
    suspend/resume cycles.
    
    [whot: amended to mtdev_close_delete in evdev_query_touch]
    
    Signed-off-by: Daniel Stone <daniel@fooishbar.org>
    Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/eventcomm.c b/src/eventcomm.c
index b1d5460..6f4d2a5 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -122,7 +122,7 @@ UninitializeTouch(InputInfoPtr pInfo)
         proto_data->last_mt_vals = NULL;
     }
 
-    mtdev_close(proto_data->mtdev);
+    mtdev_close_delete(proto_data->mtdev);
     proto_data->mtdev = NULL;
     proto_data->num_touches = 0;
 }
@@ -852,7 +852,7 @@ event_query_touch(InputInfoPtr pInfo)
     }
 
  out:
-    mtdev_close(mtdev);
+    mtdev_close_delete(mtdev);
 }
 
 /**

commit a5ac54f60af96b9b862425ccd8b6c7afaa4937e4
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Dec 21 10:37:34 2012 +1000

    Allow dead areas to update the button state
    
    On clickpads, a dead area helps prevent pointer movement when the buttons
    are pressed. Thus check for the button state before resetting the hw state
    in case we get a right-click in the soft button area.
    
    For clickfinger, the effect is that clickfinger events are now triggered if
    the finger rests in the dead area.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/synaptics.c b/src/synaptics.c
index 0472197..29e551a 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -2795,6 +2795,9 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now,
 
     inside_active_area = is_inside_active_area(priv, hw->x, hw->y);
 
+    /* these two just update hw->left, right, etc. */
+    update_hw_button_state(pInfo, hw, priv->old_hw_state, now, &delay);
+
     /* now we know that these _coordinates_ aren't in the area.
        invalid are: x, y, z, numFingers, fingerWidth
        valid are: millis, left/right/middle/up/down/etc.
@@ -2806,9 +2809,6 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now,
          * really release, the finger should remain down. */
     }
 
-    /* these two just update hw->left, right, etc. */
-    update_hw_button_state(pInfo, hw, priv->old_hw_state, now, &delay);
-
     /* no edge or finger detection outside of area */
     if (inside_active_area) {
         edge = edge_detection(priv, hw->x, hw->y);

commit 86460318ba5606ef41712b52e50bf7b2ba083226
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Aug 23 16:22:31 2012 +1000

    Recognise the soft button area property before clickpad is enabled
    
    Otherwise the driver has no internal reference to the soft button area
    property and will ignore any setting.
    
    Also, if a client sets this property, we claim it as our own and disallow
    deletion.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/properties.c b/src/properties.c
index 72ba896..dd88fc7 100644
--- a/src/properties.c
+++ b/src/properties.c
@@ -707,6 +707,16 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
     }
     else if (property == prop_product_id || property == prop_device_node)
         return BadValue;        /* read-only */
+    else { /* unknown property */
+        if (strcmp(SYNAPTICS_PROP_SOFTBUTTON_AREAS, NameForAtom(property)) == 0)
+        {
+            prop_softbutton_areas = property;
+            if (SetProperty(dev, property, prop, checkonly) != Success)
+                prop_softbutton_areas = 0;
+            else if (!checkonly)
+                XISetDevicePropertyDeletable(dev, property, FALSE);
+        }
+    }
 
     return Success;
 }

commit 3cb14dcccf5574366d90e24f351e3ad04b35e35f
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Oct 8 11:10:44 2012 +1000

    test: drop xf86CheckStrOption from fake symbols
    
    The tests don't need this symbol anymore.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/test/fake-symbols.c b/test/fake-symbols.c
index 4674ea1..0100fd1 100644
--- a/test/fake-symbols.c
+++ b/test/fake-symbols.c
@@ -84,12 +84,6 @@ xf86NameCmp(const char *s1, const char *s2)
     return 0;
 }
 
-_X_EXPORT char *
-xf86CheckStrOption(XF86OptionPtr optlist, const char *name, char *deflt)
-{
-    return NULL;
-}
-
 _X_EXPORT void
 xf86AddEnabledDevice(InputInfoPtr pInfo)
 {
diff --git a/test/fake-symbols.h b/test/fake-symbols.h
index 76d8e63..5be40b9 100644
--- a/test/fake-symbols.h
+++ b/test/fake-symbols.h
@@ -15,7 +15,6 @@ extern XF86OptionPtr xf86AddNewOption(XF86OptionPtr head, const char *name,
 extern char *xf86OptionName(XF86OptionPtr opt);
 extern const char *xf86FindOptionValue(XF86OptionPtr options, const char *name);
 extern int xf86NameCmp(const char *s1, const char *s2);
-extern char *xf86CheckStrOption(XF86OptionPtr optlist, const char *name, char *deflt);
 
 extern char *xf86SetStrOption(XF86OptionPtr optlist, const char *name,
                               const char *deflt);
@@ -26,7 +25,6 @@ extern const char *xf86FindOptionValue(XF86OptionPtr options, const char *name);
 extern char *xf86OptionName(XF86OptionPtr opt);
 extern char *xf86OptionValue(XF86OptionPtr opt);
 extern int xf86NameCmp(const char *s1, const char *s2);
-extern char *xf86CheckStrOption(XF86OptionPtr optlist, const char *name, char *deflt);
 extern void xf86AddEnabledDevice(InputInfoPtr pInfo);
 extern void xf86RemoveEnabledDevice(InputInfoPtr pInfo);
 extern Atom XIGetKnownProperty(char *name);

commit 89cffd403b798a96d36b8d47a202f30ef1023e63
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sat Sep 15 23:52:13 2012 +0200

    Enable ps2comm and alpscomm build on GNU/Hurd
    
    Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

diff --git a/configure.ac b/configure.ac
index e15f5d5..13644d2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -107,7 +107,7 @@ case "${host}" in
 	BUILD_PS2COMM="yes"
 	BUILD_PSMCOMM="yes"
 	;;
-*solaris*)
+*solaris* | *gnu*)
 	AC_MSG_RESULT([ps2comm alpscomm])
 	BUILD_PS2COMM="yes"
 	;;

commit a245d42f53096b1ae81e6702729f97ca508e5b5b
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Aug 30 16:38:38 2012 +1000

    Reset num_active_touches on DeviceOff (#52496)
    
    When disabling the device, reset num_active_touches to zero. Otherwise,
    num_active_touches stays at the value it was on DeviceOff(). Future touches
    add to that value until the index may go past priv->open_slots[].
    That causes spurious memory corruption on touch ends.
    
    And as of 55fc42e7c9b4948cadd4f98ef7b6a3b12e268e3e we ignore pre-existing
    touches anyway.


Reply to: