diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/eventcomm.c | 7 | ||||
-rw-r--r-- | src/properties.c | 7 | ||||
-rw-r--r-- | src/synaptics.c | 1 | ||||
-rw-r--r-- | src/synapticsstr.h | 1 |
4 files changed, 16 insertions, 0 deletions
diff --git a/src/eventcomm.c b/src/eventcomm.c index b49b73a..d031eb4 100644 --- a/src/eventcomm.c +++ b/src/eventcomm.c @@ -716,6 +716,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; @@ -733,6 +734,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/properties.c b/src/properties.c index 0a52801..38f21b2 100644 --- a/src/properties.c +++ b/src/properties.c @@ -58,6 +58,7 @@ Atom prop_finger = 0; Atom prop_tap_time = 0; Atom prop_tap_move = 0; Atom prop_tap_durations = 0; +Atom prop_clickpad = 0; Atom prop_tap_fast = 0; Atom prop_middle_timeout = 0; Atom prop_twofinger_pressure = 0; @@ -189,6 +190,8 @@ InitDeviceProperties(InputInfoPtr pInfo) values[2] = para->click_time; prop_tap_durations = InitAtom(pInfo->dev, SYNAPTICS_PROP_TAP_DURATIONS, 32, 3, values); + prop_clickpad = InitAtom(pInfo->dev, SYNAPTICS_PROP_CLICKPAD, 8, 1, + ¶->clickpad); prop_tap_fast = InitAtom(pInfo->dev, SYNAPTICS_PROP_TAP_FAST, 8, 1, ¶->fast_taps); prop_middle_timeout = InitAtom(pInfo->dev, SYNAPTICS_PROP_MIDDLE_TIMEOUT, 32, 1, ¶->emulate_mid_button_time); @@ -392,7 +395,11 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, para->single_tap_timeout = timeouts[0]; para->tap_time_2 = timeouts[1]; para->click_time = timeouts[2]; + } else if (property == prop_clickpad) { + if (prop->size != 1 || prop->format != 8 || prop->type != XA_INTEGER) + return BadMatch; + para->clickpad = *(BOOL*)prop->data; } else if (property == prop_tap_fast) { if (prop->size != 1 || prop->format != 8 || prop->type != XA_INTEGER) diff --git a/src/synaptics.c b/src/synaptics.c index 6143005..77afbcd 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -552,6 +552,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", 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); diff --git a/src/synapticsstr.h b/src/synapticsstr.h index b346293..a6e94e3 100644 --- a/src/synapticsstr.h +++ b/src/synapticsstr.h @@ -126,6 +126,7 @@ typedef struct _SynapticsParameters int single_tap_timeout; /* timeout to recognize a single tap */ 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 fast_taps; /* Faster reaction to single taps */ int emulate_mid_button_time; /* Max time between left and right button presses to emulate a middle button press. */ |