summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2012-02-04 14:21:51 -0800
committerChase Douglas <chase.douglas@canonical.com>2012-03-02 12:07:49 -0800
commitefb9fee9c8da54d47b70567ae77d6e8ad64cf66f (patch)
tree64b3f3ade3923d97b3c56dc991f60f4c007bd0cf
parente283d282ca66ec19e849eb6df6a2ee9a5f323974 (diff)
Check for clickpad property
However, only enable it by default if a right button is physically present. Clickpad support conflicts with click action support, so the user would be left without right button support if there is no physical right button. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
-rw-r--r--src/eventcomm.c7
-rw-r--r--src/synaptics.c7
2 files changed, 13 insertions, 1 deletions
diff --git a/src/eventcomm.c b/src/eventcomm.c
index 6147e41..60be6fe 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -713,6 +713,7 @@ static void
event_query_touch(InputInfoPtr pInfo)
{
SynapticsPrivate *priv = (SynapticsPrivate *)pInfo->private;
+ SynapticsParameters *para = &priv->synpara;
struct eventcomm_proto_data *proto_data = priv->proto_data;
struct mtdev *mtdev;
int i;
@@ -730,6 +731,12 @@ event_query_touch(InputInfoPtr pInfo)
return;
}
+ if (rc >= 0 && BitIsOn(&prop, INPUT_PROP_BUTTONPAD))
+ {
+ xf86IDrvMsg(pInfo, X_INFO, "found clickpad property\n");
+ para->clickpad = TRUE;
+ }
+
mtdev = mtdev_new_open(pInfo->fd);
if (!mtdev)
{
diff --git a/src/synaptics.c b/src/synaptics.c
index 4f6b65f..64e87da 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -488,6 +488,11 @@ static void set_default_parameters(InputInfoPtr pInfo)
palmMinWidth = priv->minw + range * (10.0/16);
emulateTwoFingerMinW = priv->minw + range * (7.0/16);
+ /* Clickpad conflicts with click actions, disable by default unless there
+ * is a physical right button. */
+ if (pars->clickpad && !priv->has_right)
+ pars->clickpad = 0;
+
/* Enable tap if we don't have a phys left button */
tapButton1 = priv->has_left ? 0 : 1;
tapButton2 = priv->has_left ? 0 : 3;
@@ -534,7 +539,7 @@ static void set_default_parameters(InputInfoPtr pInfo)
pars->tap_move = xf86SetIntOption(opts, "MaxTapMove", tapMove);
pars->tap_time_2 = xf86SetIntOption(opts, "MaxDoubleTapTime", 180);
pars->click_time = xf86SetIntOption(opts, "ClickTime", 100);
- pars->clickpad = xf86SetIntOption(opts, "ClickPad", FALSE);
+ pars->clickpad = xf86SetIntOption(opts, "ClickPad", pars->clickpad); /* Probed */
pars->fast_taps = xf86SetBoolOption(opts, "FastTaps", FALSE);
pars->emulate_mid_button_time = xf86SetIntOption(opts, "EmulateMidButtonTime", 75);
pars->emulate_twofinger_z = xf86SetIntOption(opts, "EmulateTwoFingerMinZ", emulateTwoFingerMinZ);