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

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



 conf/11-x11-synaptics.fdi |    9 ------
 conf/50-synaptics.conf    |   24 ++--------------
 configure.ac              |    2 -
 debian/changelog          |   31 ++++++++++++++++----
 debian/control            |    4 +-
 man/synaptics.man         |   31 ++++++++++++++++----
 src/eventcomm.c           |   68 +++++++++++++++++++++++++++++++++++++---------
 src/properties.c          |    3 ++
 src/synaptics.c           |   45 +++++++++++++++---------------
 src/synapticsstr.h        |    1 
 src/synproto.h            |   10 +++---
 11 files changed, 144 insertions(+), 84 deletions(-)

New commits:
commit bdcb5efeb7804ba7050e190bc2ad685fcd0e3e65
Author: Julien Cristau <jcristau@debian.org>
Date:   Mon Jun 16 20:19:32 2014 +0200

    Remove Cyril from Uploaders.

diff --git a/debian/changelog b/debian/changelog
index fb5be39..97fb909 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-input-synaptics (1.8.0-1~exp3) UNRELEASED; urgency=medium
+
+  * Remove Cyril from Uploaders.
+
+ -- Julien Cristau <jcristau@debian.org>  Mon, 16 Jun 2014 20:19:21 +0200
+
 xserver-xorg-input-synaptics (1.8.0-1~exp2) experimental; urgency=medium
 
   * Mark libevdev-dev build dependency [linux-any]. (closes: #749286)
diff --git a/debian/control b/debian/control
index 965fbb2..06289c8 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: xserver-xorg-input-synaptics
 Section: x11
 Priority: optional
 Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
-Uploaders: Mattia Dongili <malattia@debian.org>, Cyril Brulebois <kibi@debian.org>, maximilian attems <maks@debian.org>
+Uploaders: Mattia Dongili <malattia@debian.org>, maximilian attems <maks@debian.org>
 Build-Depends:
  debhelper (>= 8),
  dh-autoreconf,

commit 0173190ae24f0fe85920a4d14eecc0fb49876602
Author: maximilian attems <maks@debian.org>
Date:   Wed May 28 05:47:00 2014 +0200

    prepare to release 1.8.0-1~exp2
    
    Signed-off-by: maximilian attems <maks@debian.org>

diff --git a/debian/changelog b/debian/changelog
index 43d2b18..fb5be39 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,9 @@
-xserver-xorg-input-synaptics (1.8.0-1~exp2) UNRELEASED; urgency=medium
+xserver-xorg-input-synaptics (1.8.0-1~exp2) experimental; urgency=medium
 
   * Mark libevdev-dev build dependency [linux-any]. (closes: #749286)
     Thanks to Pino Toscano <pino@debian.org>.
 
- -- maximilian attems <maks@debian.org>  Tue, 27 May 2014 14:12:32 +0200
+ -- maximilian attems <maks@debian.org>  Wed, 28 May 2014 05:46:25 +0200
 
 xserver-xorg-input-synaptics (1.8.0-1~exp1) experimental; urgency=medium
 

commit 7f1abd50d35c66f8b4f3a14ae8299f439cbc0d5c
Author: maximilian attems <maks@debian.org>
Date:   Tue May 27 14:14:38 2014 +0200

    care about !linux ftbfs
    
    Signed-off-by: maximilian attems <maks@debian.org>

diff --git a/debian/changelog b/debian/changelog
index dd1e671..43d2b18 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+xserver-xorg-input-synaptics (1.8.0-1~exp2) UNRELEASED; urgency=medium
+
+  * Mark libevdev-dev build dependency [linux-any]. (closes: #749286)
+    Thanks to Pino Toscano <pino@debian.org>.
+
+ -- maximilian attems <maks@debian.org>  Tue, 27 May 2014 14:12:32 +0200
+
 xserver-xorg-input-synaptics (1.8.0-1~exp1) experimental; urgency=medium
 
   [ Maarten Lankhorst ]
diff --git a/debian/control b/debian/control
index 0da51a5..965fbb2 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,7 @@ Build-Depends:
  libx11-dev,
  libxext-dev,
  libxi-dev (>= 2:1.2.0),
- libevdev-dev,
+ libevdev-dev [linux-any],
  x11proto-core-dev,
  xserver-xorg-dev (>= 2:1.12),
  pkg-config,

commit ca09f7ebb599b9fdaba55a3cfa4e78188a8b229d
Author: maximilian attems <maks@debian.org>
Date:   Fri May 23 18:27:47 2014 +0200

    changelog prepare to upload 1.8.0 to experimental
    
    Signed-off-by: maximilian attems <maks@debian.org>

diff --git a/debian/changelog b/debian/changelog
index d6bc073..dd1e671 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-xserver-xorg-input-synaptics (1.8.0-1~exp1) UNRELEASED; urgency=medium
+xserver-xorg-input-synaptics (1.8.0-1~exp1) experimental; urgency=medium
 
   [ Maarten Lankhorst ]
   * Drop libxtst-dev conflicts, add libevdev-dev.
@@ -9,7 +9,7 @@ xserver-xorg-input-synaptics (1.8.0-1~exp1) UNRELEASED; urgency=medium
     - support newer Thinkpads (closes: #705807)
   * add myself to Uploaders.
 
- -- maximilian attems <maks@debian.org>  Fri, 23 May 2014 00:09:40 +0200
+ -- maximilian attems <maks@debian.org>  Fri, 23 May 2014 18:27:28 +0200
 
 xserver-xorg-input-synaptics (1.7.3-1) unstable; urgency=medium
 

commit b72abe3763bf938820198b0a2d80c1f4156bde22
Author: maximilian attems <maks@debian.org>
Date:   Fri May 23 00:34:05 2014 +0200

    add myself to uploaders
    
    Signed-off-by: maximilian attems <maks@debian.org>

diff --git a/debian/changelog b/debian/changelog
index 9ba86aa..d6bc073 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ xserver-xorg-input-synaptics (1.8.0-1~exp1) UNRELEASED; urgency=medium
   * New upstream release (closes: #743488).
     - Revert "Purge scrollbuttons (repeat)" (closes: #722006).
     - support newer Thinkpads (closes: #705807)
+  * add myself to Uploaders.
 
  -- maximilian attems <maks@debian.org>  Fri, 23 May 2014 00:09:40 +0200
 
diff --git a/debian/control b/debian/control
index c4132fc..0da51a5 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: xserver-xorg-input-synaptics
 Section: x11
 Priority: optional
 Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
-Uploaders: Mattia Dongili <malattia@debian.org>, Cyril Brulebois <kibi@debian.org>
+Uploaders: Mattia Dongili <malattia@debian.org>, Cyril Brulebois <kibi@debian.org>, maximilian attems <maks@debian.org>
 Build-Depends:
  debhelper (>= 8),
  dh-autoreconf,

commit 043fa5a9860ac70889264d2d4536745cc73f16be
Author: maximilian attems <maks@debian.org>
Date:   Fri May 23 00:29:01 2014 +0200

    changelog add bug numbers.
    
    Signed-off-by: maximilian attems <maks@debian.org>

diff --git a/debian/changelog b/debian/changelog
index 682e5a6..9ba86aa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,7 +4,9 @@ xserver-xorg-input-synaptics (1.8.0-1~exp1) UNRELEASED; urgency=medium
   * Drop libxtst-dev conflicts, add libevdev-dev.
 
   [ maximilian attems ]
-  * New upstream release.
+  * New upstream release (closes: #743488).
+    - Revert "Purge scrollbuttons (repeat)" (closes: #722006).
+    - support newer Thinkpads (closes: #705807)
 
  -- maximilian attems <maks@debian.org>  Fri, 23 May 2014 00:09:40 +0200
 

commit 47df3cd770385f2da9057ab0fe990ff8272847cb
Author: maximilian attems <maks@debian.org>
Date:   Fri May 23 00:10:24 2014 +0200

    update changelog
    
    Signed-off-by: maximilian attems <maks@debian.org>

diff --git a/debian/changelog b/debian/changelog
index 8175941..682e5a6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,12 @@
-xserver-xorg-input-synaptics (1.7.99.1-1) UNRELEASED; urgency=medium
+xserver-xorg-input-synaptics (1.8.0-1~exp1) UNRELEASED; urgency=medium
 
-  * New upstream release.
+  [ Maarten Lankhorst ]
   * Drop libxtst-dev conflicts, add libevdev-dev.
 
- -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Thu, 27 Feb 2014 17:27:33 +0100
+  [ maximilian attems ]
+  * New upstream release.
+
+ -- maximilian attems <maks@debian.org>  Fri, 23 May 2014 00:09:40 +0200
 
 xserver-xorg-input-synaptics (1.7.3-1) unstable; urgency=medium
 

commit 3a4cc96590ca0e0ff526a5e5406f29a402bddd1a
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue May 13 11:20:25 2014 +1000

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

diff --git a/configure.ac b/configure.ac
index 712d48d..91b3eda 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-input-synaptics],
-        [1.7.99.2],
+        [1.8.0],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-input-synaptics])
 AC_CONFIG_SRCDIR([Makefile.am])

commit d4d7229c41a20cf6757882a24f45e28d936a27c5
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Apr 30 13:08:53 2014 +1000

    conf: drop the PNPID matching from the fdi file
    
    Rely on INPUT_PROP_TOP_BUTTONPAD and default button areas as well.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/conf/11-x11-synaptics.fdi b/conf/11-x11-synaptics.fdi
index 8145912..ab8156d 100644
--- a/conf/11-x11-synaptics.fdi
+++ b/conf/11-x11-synaptics.fdi
@@ -31,18 +31,10 @@
 	For other possible options, check CONFIGURATION DETAILS in synaptics man page
         -->
         <merge key="input.x11_options.SoftButtonAreas" type="string">50% 0 82% 0 0 0 0 0</merge>
+        <merge key="input.x11_options.SecondarySoftButtonAreas" type="string">58% 0 0 8% 42% 58% 0 8%</merge>
         <match key="info.product" contains="Apple|bcm5974">
             <merge key="input.x11_options.SoftButtonAreas" type="string">0 0 0 0 0 0 0 0</merge>
         </match>
     </match>
-
-    <match
-        key="/org/freedesktop/Hal/devices/computer:system.hardware.version"
-        contains_outof="ThinkPad T440;ThinkPad X240;ThinkPad T540;ThinkPad Helix;ThinkPad S1 Yoga;ThinkPad L440;ThinkPad X1 Carbon 2nd;ThinkPad T431;ThinkPad L540">
-        <match key="input.product" contains="Synaptics">
-            <merge key="input.x11_options.ClickPad" type="string">on</merge>
-            <merge key="input.x11_options.SecondarySoftButtonAreas" type="string">58% 0 0 8% 42% 58% 0 8%</merge>
-        </match>
-    </match>
   </device>
 </deviceinfo>

commit a31ecb669f40d8db3ab1867eaedfe364bbd6fafe
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Apr 30 07:45:34 2014 +1000

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

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

commit efa424b5c9c084c1c1136a68329709c7dc9ddfda
Author: Clinton Sprain <clintonsprain@gmail.com>
Date:   Tue Apr 29 19:47:17 2014 -0500

    Fix product ID cutoff for MODEL_APPLETOUCH/MODEL_UNIBODY_MACBOOK
    
    Some Macbooks are being tagged as MODEL_UNIBODY_MACBOOKs when they should not
    be. This causes the default sensitivity to be very low for them, making the
    touchpad almost unusable. This change puts those devices into the correct
    bucket again.
    
    Signed-off-by: Clinton Sprain <clintonsprain@gmail.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/eventcomm.c b/src/eventcomm.c
index 0a6ea48..37de38a 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -337,7 +337,9 @@ static struct model_lookup_t model_lookup_table[] = {
     {0x0002, 0x0007, 0x0007, MODEL_SYNAPTICS},
     {0x0002, 0x0008, 0x0008, MODEL_ALPS},
     {0x05ac, PRODUCT_ANY, 0x222, MODEL_APPLETOUCH},
-    {0x05ac, 0x223, PRODUCT_ANY, MODEL_UNIBODY_MACBOOK},
+    {0x05ac, 0x223, 0x228, MODEL_UNIBODY_MACBOOK},
+    {0x05ac, 0x229, 0x22b, MODEL_APPLETOUCH},
+    {0x05ac, 0x22c, PRODUCT_ANY, MODEL_UNIBODY_MACBOOK},
     {0x0002, 0x000e, 0x000e, MODEL_ELANTECH},
     {0x0, 0x0, 0x0, 0x0}
 };

commit 7bf27568417691e772e715f8fc6c30ea7ec892d6
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Tue Apr 22 18:58:11 2014 +0200

    Add support for INPUT_PROP_TOPBUTTONPAD
    
    Add a HasSecondaryButtons boolean config option which defaults to true for
    devices with the INPUT_PROP_TOPBUTTONPAD and false for all other devices.
    
    Only parse the SecondarySoftButtonAreas when this option is true, effectively
    disabling the top buttons when it is false. Likewise, only initialize the
    SecondarySoftButtonAreas property if we enable support for it.
    
    This means that it is now safe to always set a SecondarySoftButtonAreas
    default in 50-synaptics.conf, and that he section which was intended for
    use with future pnp-id matching can be dropped, as that is now all handled
    in the kernel.
    
    While at also remove the comment about disabling the bottom edge area, as that
    is now done automatically.
    
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

diff --git a/conf/50-synaptics.conf b/conf/50-synaptics.conf
index 161c1dd..a3145b8 100644
--- a/conf/50-synaptics.conf
+++ b/conf/50-synaptics.conf
@@ -25,16 +25,15 @@ Section "InputClass"
         Option "Ignore" "on"
 EndSection
 
-# This option enables the bottom right corner to be a right button on
-# non-synaptics clickpads.
+# This option enables the bottom right corner to be a right button on clickpads
+# and the right and middle top areas to be right / middle buttons on clickpads
+# with a top button area.
 # This option is only interpreted by clickpads.
 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%"
+        Option "SecondarySoftButtonAreas" "58% 0 0 8% 42% 58% 0 8%"
 EndSection
 
 # This option disables software buttons on Apple touchpads.
@@ -45,19 +44,3 @@ Section "InputClass"
         MatchDriver "synaptics"
         Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"
 EndSection
-
-# The Lenovo *40 series has no physical button for the TrackPoint and needs
-# the top softbutton area enabled by default.
-# Affected devices and their PNPIDs
-#       LEN0033:      Helix
-#       LEN0034:      T431, T540, X1 Carbon
-#       LEN0035:      X240
-#       LEN0036:      T440
-#       LEN0042:      Yoga
-#       LEN2004:      L440, L540
-Section "InputClass"
-        Identifier "Lenovo TrackPoint top software buttons"
-        MatchDriver "synaptics"
-        MatchPnPID  "LEN0033*|LEN0034*|LEN0035*|LEN0036*|LEN0042*|LEN2004*"
-        Option "SecondarySoftButtonAreas" "58% 0 0 8% 42% 58% 0 8%"
-EndSection
diff --git a/man/synaptics.man b/man/synaptics.man
index 2b8d1d9..76756be 100644
--- a/man/synaptics.man
+++ b/man/synaptics.man
@@ -495,17 +495,28 @@ buttons to share an edge value.
 Property: "Synaptics Soft Button Areas"
 .
 .TP
-.BI "Option \*qSecondarySoftButtonAreas\*q \*q" "RBL RBR RBT RBB MBL MBR MBT MBB" \*q
+.BI "Option \*qHasSecondarySoftButtons\*q \*q" boolean \*q
 This option is only available on ClickPad devices.
-Enable secondary soft button click area support on ClickPad devices (usually on
+Enable the secondary software button area support. The exact area must be
+set in option \*qSecondarySoftButtonAreas\*q.  See
+.B ClickPad support
+for more details.
+.
+.TP
+.BI "Option \*qSecondarySoftButtonAreas\*q \*q" "RBL RBR RBT RBB MBL MBR MBT MBB" \*q
+This option is only available on ClickPad devices and only if
+.B Option \*qHasSecondarySoftButtons\*q
+is enabled.
+Define the secondary soft button click areas on ClickPad devices (usually on
 top of the device).
 For the allowed values for this option, see
 .B Option \*qSoftButtonAreas\*q.
 Primary and secondary soft button areas must not overlap each other. If they do,
 the behavior of the driver is undefined.
 Property: "Synaptics Secondary Soft Button Areas". This property is only
-initialized if the option is set in the
-__xconfigfile__(__filemansuffix__).
+initialized if 
+.B Option \*qHasSecondarySoftButtons\*q 
+is enabled and this option is set in the __xconfigfile__(__filemansuffix__).
 .
 
 .SH CONFIGURATION DETAILS
@@ -729,9 +740,15 @@ area, a right or middle click is performed.
 .LP
 Some laptops, most notably the Lenovo T440, T540 and x240 series, provide a
 pointing stick without physical buttons. On those laptops, the top of the
-touchpad acts as software-emulated button area. This area can be configured
+touchpad acts as software-emulated button area. This area can be enabled
+with
+.B Option \*qHasSecondarySoftButtons\*q
+and configured
 with
-.B Option SecondarySoftButtonAreas.
+.B Option \*qSecondarySoftButtonAreas\*q.
+On some platforms, this option
+will be set automatically if the kernel detects a matching device. On Linux,
+the device must have the INPUT_PROP_TOPBUTTONPAD property set.
 
 .SH "DEVICE PROPERTIES"
 Synaptics 1.0 and higher support input device properties if the driver is
diff --git a/src/eventcomm.c b/src/eventcomm.c
index 5871374..0a6ea48 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -50,6 +50,9 @@
 #ifndef INPUT_PROP_SEMI_MT
 #define INPUT_PROP_SEMI_MT 0x03
 #endif
+#ifndef INPUT_PROP_TOPBUTTONPAD
+#define INPUT_PROP_TOPBUTTONPAD 0x04
+#endif
 #ifndef ABS_MT_TOOL_Y
 #define ABS_MT_TOOL_Y 0x3d
 #endif
@@ -802,6 +805,11 @@ event_query_touch(InputInfoPtr pInfo)
         xf86IDrvMsg(pInfo, X_INFO, "found clickpad property\n");
         para->clickpad = TRUE;
     }
+
+    if (libevdev_has_property(dev, INPUT_PROP_TOPBUTTONPAD)) {
+        xf86IDrvMsg(pInfo, X_INFO, "found top buttonpad property\n");
+        para->has_secondary_buttons = TRUE;
+    }
 #endif
 
 
diff --git a/src/properties.c b/src/properties.c
index 4c75797..718d054 100644
--- a/src/properties.c
+++ b/src/properties.c
@@ -176,6 +176,9 @@ InitSoftButtonProperty(InputInfoPtr pInfo)
     prop_softbutton_areas =
         InitAtom(pInfo->dev, SYNAPTICS_PROP_SOFTBUTTON_AREAS, 32, 8, values);
 
+    if (!para->has_secondary_buttons)
+        return;
+
     values[0] = para->softbutton_areas[TOP_RIGHT_BUTTON_AREA][LEFT];
     values[1] = para->softbutton_areas[TOP_RIGHT_BUTTON_AREA][RIGHT];
     values[2] = para->softbutton_areas[TOP_RIGHT_BUTTON_AREA][TOP];
diff --git a/src/synaptics.c b/src/synaptics.c
index 118d1c6..b25c902 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -674,6 +674,10 @@ set_default_parameters(InputInfoPtr pInfo)
     pars->tap_time_2 = xf86SetIntOption(opts, "MaxDoubleTapTime", 180);
     pars->click_time = xf86SetIntOption(opts, "ClickTime", 100);
     pars->clickpad = xf86SetBoolOption(opts, "ClickPad", pars->clickpad);       /* Probed */
+    if (pars->clickpad)
+        pars->has_secondary_buttons = xf86SetBoolOption(opts,
+                                                        "HasSecondarySoftButtons",
+                                                        pars->has_secondary_buttons);
     pars->clickpad_ignore_motion_time = 100; /* ms */
     /* middle mouse button emulation on a clickpad? nah, you're joking */
     middle_button_timeout = pars->clickpad ? 0 : 75;
@@ -777,7 +781,8 @@ set_default_parameters(InputInfoPtr pInfo)
     }
 
     set_primary_softbutton_areas_option(pInfo);
-    set_secondary_softbutton_areas_option(pInfo);
+    if (pars->has_secondary_buttons)
+        set_secondary_softbutton_areas_option(pInfo);
 }
 
 static double
diff --git a/src/synapticsstr.h b/src/synapticsstr.h
index b8a3492..4bd32ac 100644
--- a/src/synapticsstr.h
+++ b/src/synapticsstr.h
@@ -176,6 +176,7 @@ typedef struct _SynapticsParameters {
     int tap_time_2;             /* max. tapping time for double taps */
     int click_time;             /* The duration of a single click */
     Bool clickpad;              /* Device is a has integrated buttons */
+    Bool has_secondary_buttons; /* Device has a top soft-button area */
     int clickpad_ignore_motion_time; /* Ignore motion for X ms after a click */
     int emulate_mid_button_time;        /* Max time between left and right button presses to
                                            emulate a middle button press. */

commit 41afac2abf12dd74a171f726b57014f7fb266957
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Apr 29 12:13:10 2014 +1000

    man: add some missing quotes
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/man/synaptics.man b/man/synaptics.man
index 081ce12..2b8d1d9 100644
--- a/man/synaptics.man
+++ b/man/synaptics.man
@@ -722,7 +722,7 @@ support at runime, the user must also set the middle mouse button timeout to
 driver.
 .LP
 ClickPads provide software emulated buttons through 
-.B Option SoftButtonAreas.
+.B Option \*qSoftButtonAreas\*q.
 These buttons enable areas on the touchpad to perform as right or middle
 mouse button. When the user performs a click within a defined soft button
 area, a right or middle click is performed.

commit a6f0f4c9a5bcb0e25343dd4c59d4cc47cc5e8006
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Fri Apr 11 20:41:36 2014 +0200

    Always count tripletap + click as 3 fingerclick on pads with < 3 touches
    
    When trying to do a 3 fingerclick on a touchpad which only tracks 2 touches,
    this may register as a 3 or 2 fingerclick depending on the order in which
    the touchpad detects the fingers. If the 2 outer fingers of the 3 get seen
    first, then the 2 touches will be too far apart for the heuristic to see
    them as being close together, and the click gets counted as a 2 finger click.
    
    A user will likely never do a 2 finger click with a 3th finger resting
    somewhere else on the pad, where-as the above misdetection of the clicks is
    a real issue, so simply always count a click with trippletap set as a
    3 finger click on pads which track less then 3 touches.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1086218
    
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/synaptics.c b/src/synaptics.c
index f4c1d4a..118d1c6 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -2673,26 +2673,11 @@ clickpad_guess_clickfingers(SynapticsPrivate * priv,
     }
 
     /* Some trackpads touchpad only track two touchpoints but announce
-       BTN_TOOL_TRIPLETAP (which sets hw->numFingers to 3).
-       This can affect clickfingers, in the following ways:
-       * one finger down: normal click
-       * two fingers down, close together: 2 finger click
-       * two fingers down, apart: normal click
-       * three fingers down, close together: 3 finger click
-       * three fingers down, with two grouped next to each other: should be
-       * 2-finger click but we can't detect this.
-       * so: if two detected fingers are close together and HW says three
-       * fingers, make it three fingers.
-       * if two detected fingers are apart and HW says three fingers, make
-       * it a two-finger click, guessing that the third finger is somewhere
-       * close to another finger.
-       */
-    if (hw->numFingers >= 3 && nfingers < hw->numFingers) {
-        if (!nfingers) /* touchpoints too far apart */
-            nfingers = 2;
-        else
-            nfingers++;
-    }
+     * BTN_TOOL_TRIPLETAP (which sets hw->numFingers to 3), when this happens
+     * the user likely intents to do a 3 finger click, so handle it as such.
+     */
+    if (hw->numFingers >= 3 && hw->num_mt_mask < 3)
+        nfingers = 3;
 
     return nfingers;
 }

commit f183c1c38778b659b4c75a0e2c532dd5a9f8d437
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Apr 9 10:41:29 2014 +1000

    conf: add more PnPIDs and DMI matches for Lenovos
    
    And expand DMI strings to more precise matches
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

diff --git a/conf/11-x11-synaptics.fdi b/conf/11-x11-synaptics.fdi
index a898875..8145912 100644
--- a/conf/11-x11-synaptics.fdi
+++ b/conf/11-x11-synaptics.fdi
@@ -37,7 +37,8 @@
     </match>
 
     <match
-        key="/org/freedesktop/Hal/devices/computer:system.hardware.version" contains_outof="T440;X240;T540;Helix;S1Yoga">
+        key="/org/freedesktop/Hal/devices/computer:system.hardware.version"
+        contains_outof="ThinkPad T440;ThinkPad X240;ThinkPad T540;ThinkPad Helix;ThinkPad S1 Yoga;ThinkPad L440;ThinkPad X1 Carbon 2nd;ThinkPad T431;ThinkPad L540">
         <match key="input.product" contains="Synaptics">
             <merge key="input.x11_options.ClickPad" type="string">on</merge>
             <merge key="input.x11_options.SecondarySoftButtonAreas" type="string">58% 0 0 8% 42% 58% 0 8%</merge>
diff --git a/conf/50-synaptics.conf b/conf/50-synaptics.conf
index d808e6f..161c1dd 100644
--- a/conf/50-synaptics.conf
+++ b/conf/50-synaptics.conf
@@ -50,13 +50,14 @@ EndSection
 # the top softbutton area enabled by default.
 # Affected devices and their PNPIDs
 #       LEN0033:      Helix
-#       LEN0034:      T540
+#       LEN0034:      T431, T540, X1 Carbon
 #       LEN0035:      X240
 #       LEN0036:      T440
 #       LEN0042:      Yoga
+#       LEN2004:      L440, L540
 Section "InputClass"
         Identifier "Lenovo TrackPoint top software buttons"
         MatchDriver "synaptics"
-        MatchPnPID  "LEN0033*|LEN0034*|LEN0035*|LEN0036*|LEN0042*"
+        MatchPnPID  "LEN0033*|LEN0034*|LEN0035*|LEN0036*|LEN0042*|LEN2004*"
         Option "SecondarySoftButtonAreas" "58% 0 0 8% 42% 58% 0 8%"
 EndSection

commit 62ef210d11714703345dc8d35915ff53c37aee01
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Apr 7 16:16:13 2014 +1000

    Comment the touch states
    
    Everytime I look at this I get confused about OPEN_EMPTY vs EMPTY. Let's fix
    that.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

diff --git a/src/synproto.h b/src/synproto.h
index d81ee42..c52838c 100644
--- a/src/synproto.h
+++ b/src/synproto.h
@@ -44,11 +44,11 @@ struct _SynapticsPrivateRec;
 typedef struct _SynapticsPrivateRec SynapticsPrivate;
 
 enum SynapticsSlotState {
-    SLOTSTATE_EMPTY = 0,
-    SLOTSTATE_OPEN,
-    SLOTSTATE_CLOSE,
-    SLOTSTATE_OPEN_EMPTY,
-    SLOTSTATE_UPDATE,
+    SLOTSTATE_EMPTY = 0,        /* no slot in this cycle */
+    SLOTSTATE_OPEN,             /* tracking ID received */
+    SLOTSTATE_CLOSE,            /* tracking ID -1 received */
+    SLOTSTATE_OPEN_EMPTY,       /* previously had tracking id, no events in this read cycle */
+    SLOTSTATE_UPDATE,           /* had tracking id, other events in this cycle */
 };
 
 /* used to mark emulated hw button state */

commit bfceb1bc580656aceb14e4b0f880bfcb3e4bc368
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Apr 4 15:51:22 2014 +1000

    eventcomm: Hook up the libevdev log handler
    
    This is a bit problematic: libevdev only has one global log handler.
    So if we have another driver use libevdev, we'll either overwrite that handler
    or get overwritten, whichever comes first. So we need to re-set the handler
    every time we get an event to make sure we log through our handler.
    Likewise, if we ever drop the device, we need to unset the log handler back to
    NULL because we may unload the module and our handler may disappear.
    
    Use the lowest logging priority, let the server filter based on the verbosity
    level instead.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

diff --git a/src/eventcomm.c b/src/eventcomm.c
index 0cbbbd0..5871374 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -87,12 +87,46 @@ struct eventcomm_proto_data {
     enum libevdev_read_flag read_flag;
 };
 
+static void
+libevdev_log_func(enum libevdev_log_priority priority,
+                  void *data,
+                  const char *file, int line, const char *func,
+                  const char *format, va_list args)
+_X_ATTRIBUTE_PRINTF(6, 0);
+
+static void
+libevdev_log_func(enum libevdev_log_priority priority,
+                  void *data,
+                  const char *file, int line, const char *func,
+                  const char *format, va_list args)
+{
+    int verbosity;
+
+    switch(priority) {
+        case LIBEVDEV_LOG_ERROR: verbosity = 0; break;
+        case LIBEVDEV_LOG_INFO: verbosity = 4; break;
+        case LIBEVDEV_LOG_DEBUG: verbosity = 10; break;
+    }
+
+    LogVMessageVerbSigSafe(X_NOTICE, verbosity, format, args);
+}
+
+static void
+set_libevdev_log_handler(void)
+{
+                              /* be quiet, gcc *handwave* */
+    libevdev_set_log_function((libevdev_log_func_t)libevdev_log_func, NULL);
+    libevdev_set_log_priority(LIBEVDEV_LOG_DEBUG);
+}
+
 struct eventcomm_proto_data *
 EventProtoDataAlloc(int fd)
 {
     struct eventcomm_proto_data *proto_data;
     int rc;
 
+    set_libevdev_log_handler();
+
     proto_data = calloc(1, sizeof(struct eventcomm_proto_data));
     if (!proto_data)
         return NULL;
@@ -181,6 +215,8 @@ EventDeviceOnHook(InputInfoPtr pInfo, SynapticsParameters * para)
     struct eventcomm_proto_data *proto_data =
         (struct eventcomm_proto_data *) priv->proto_data;
 
+    set_libevdev_log_handler();
+
     if (libevdev_get_fd(proto_data->evdev) != -1) {
         struct input_event ev;
 
@@ -224,6 +260,8 @@ EventDeviceOffHook(InputInfoPtr pInfo)
 
     UninitializeTouch(pInfo);
     libevdev_grab(proto_data->evdev, LIBEVDEV_UNGRAB);
+    libevdev_set_log_function(NULL, NULL);
+    libevdev_set_log_priority(LIBEVDEV_LOG_INFO); /* reset to default */
 
     return Success;
 }
@@ -625,6 +663,8 @@ EventReadHwState(InputInfoPtr pInfo,
     struct eventcomm_proto_data *proto_data = priv->proto_data;
     Bool sync_cumulative = FALSE;
 
+    set_libevdev_log_handler();
+
     SynapticsResetTouchHwState(hw, FALSE);
 
     /* Reset cumulative values if buttons were not previously pressed,

commit 6ad856790630393bbd41b0bd7746ed9b0629a7c6
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Apr 3 16:41:15 2014 +1000

    eventcomm: read one more event after finishing a sync
    
    Once the sync finishes, we get -EAGAIN. This only indicates the sync is done,
    but some events may still be waiting in the pipe for us to read. We must read
    those now, otherwise select may not trigger on further data.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

diff --git a/src/eventcomm.c b/src/eventcomm.c
index 5030150..0cbbbd0 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -491,8 +491,10 @@ SynapticsReadEvent(InputInfoPtr pInfo, struct input_event *ev)
         if (rc != -EAGAIN) {
             LogMessageVerbSigSafe(X_ERROR, 0, "%s: Read error %d\n", pInfo->name,
                     errno);
-        } else if (proto_data->read_flag == LIBEVDEV_READ_FLAG_SYNC)
+        } else if (proto_data->read_flag == LIBEVDEV_READ_FLAG_SYNC) {
             proto_data->read_flag = LIBEVDEV_READ_FLAG_NORMAL;
+            return SynapticsReadEvent(pInfo, ev);
+        }
 
         return FALSE;
     }

commit bec41416dbbee73eef9eee122d0acacc148e329d
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Apr 3 15:42:45 2014 +1000

    eventcomm: drop superflous helper function
    
    last_mt_vals_slot is only used in one location and there we can just use
    cur_slot
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

diff --git a/src/eventcomm.c b/src/eventcomm.c
index 858efeb..5030150 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -110,16 +110,6 @@ EventProtoDataAlloc(int fd)
     return proto_data;
 }
 
-static int
-last_mt_vals_slot(const SynapticsPrivate * priv)
-{
-    struct eventcomm_proto_data *proto_data =
-        (struct eventcomm_proto_data *) priv->proto_data;
-    int value = proto_data->cur_slot;
-
-    return value < priv->num_slots ? value : -1;
-}
-
 static void
 UninitializeTouch(InputInfoPtr pInfo)
 {
@@ -549,7 +539,7 @@ EventProcessTouchEvent(InputInfoPtr pInfo, struct SynapticsHwState *hw,
         proto_data->cur_slot = ev->value;
     }
     else {
-        int slot_index = last_mt_vals_slot(priv);
+        int slot_index = proto_data->cur_slot;
 
         if (slot_index < 0)
             return;

commit f1948e08ee9894864254a18098e4f4fceb6e322f
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Mar 19 15:08:15 2014 +1000

    Disable GrabEventDevice by default
    
    This was required when we started supporting hotplugging to avoid duplicate
    events. These days the drawback of not being able to record events in the case
    of a bug is significant.
    
    Check the configuration source on init. If the device was hotplugged through a
    a server config backend, disable the grab. If the device was statically
    configured through an xorg.conf then leave the default grab enabled to avoid
    a duplicate device.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

diff --git a/src/synaptics.c b/src/synaptics.c
index 07fd450..f4c1d4a 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -576,6 +576,8 @@ set_default_parameters(InputInfoPtr pInfo)
     int width, height, diag, range;
     int horizHyst, vertHyst;
     int middle_button_timeout;
+    int grab_event_device = 0;
+    const char *source;
 
     /* The synaptics specs specify typical edge widths of 4% on x, and 5.4% on
      * y (page 7) [Synaptics TouchPad Interfacing Guide, 510-000080 - A
@@ -747,7 +749,16 @@ set_default_parameters(InputInfoPtr pInfo)
         xf86SetRealOption(opts, "PressureMotionMinFactor", 1.0);
     pars->press_motion_max_factor =
         xf86SetRealOption(opts, "PressureMotionMaxFactor", 1.0);
-    pars->grab_event_device = xf86SetBoolOption(opts, "GrabEventDevice", TRUE);
+
+    /* Only grab the device by default if it's not coming from a config
+       backend. This way we avoid the device being added twice and sending
+       duplicate events.
+      */
+    source = xf86CheckStrOption(opts, "_source", NULL);
+    if (source == NULL || strncmp(source, "server/", 7) != 0)
+        grab_event_device = TRUE;
+    pars->grab_event_device = xf86SetBoolOption(opts, "GrabEventDevice", grab_event_device);
+
     pars->tap_and_drag_gesture =
         xf86SetBoolOption(opts, "TapAndDragGesture", TRUE);
     pars->resolution_horiz =


Reply to: