diff options
author | Hans de Goede <hdegoede@redhat.com> | 2014-04-22 18:58:11 +0200 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2014-04-30 11:41:03 +1000 |
commit | 7bf27568417691e772e715f8fc6c30ea7ec892d6 (patch) | |
tree | 562c5506876352b4e2b94fed5959bbe0fe70841e /src/synaptics.c | |
parent | 41afac2abf12dd74a171f726b57014f7fb266957 (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>
Diffstat (limited to 'src/synaptics.c')
-rw-r--r-- | src/synaptics.c | 7 |
1 files changed, 6 insertions, 1 deletions
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 |