summaryrefslogtreecommitdiff
path: root/src/properties.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2014-04-22 18:58:11 +0200
committerPeter Hutterer <peter.hutterer@who-t.net>2014-04-30 13:05:02 +1000
commitfa54c5b8fcf75531b2d6c6bb6879b3414e5c7792 (patch)
treee38ac747fc7b300720a6220a4c0b61ac45fb6a1a /src/properties.c
parent11b2814c17c17cc43cf1b22f56998b100e59cf04 (diff)
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> (cherry picked from commit 7bf27568417691e772e715f8fc6c30ea7ec892d6) Conflicts: src/eventcomm.c
Diffstat (limited to 'src/properties.c')
-rw-r--r--src/properties.c3
1 files changed, 3 insertions, 0 deletions
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];