[PATCH libinput] touchpad: only pair tracksticks with touchpads where needed

Hans de Goede hdegoede at redhat.com
Fri May 29 00:38:12 PDT 2015


Hi,

On 29-05-15 05:16, Peter Hutterer wrote:
> On topbuttonpads we need the trackstick pairing to generate the right software
> buttons, on the X1 Carbon-like devices we need the pairing to route the
> buttons correctly (though this code is obsolete with newer kernels).
>
> This fixes the touchpad being unresponsive while the trackpoint is in use.

Erm, the touchpad not working while the trackpoint is active is a feature,
and has nothing to do with the top button stuff. See tp_trackpoint_event()

This was added to avoid false mouse moves generated by palms while using
the trackpoint.

If some people dislike this we can make this configurable as another send-event
bit which defaults to on. Removing it on all but touchpads with top buttons
seems undesirable, if you want to do that it would be better to simple
remove the tp_trackpoint_event() function.

One could argue that the send-events bit for this should default to on only
on touchpads with top softbuttons though.

Regards,

Hans




>
> https://bugs.freedesktop.org/show_bug.cgi?id=90731
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
>   src/evdev-mt-touchpad.c | 8 +++++++-
>   1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
> index eacec6e..f8593a9 100644
> --- a/src/evdev-mt-touchpad.c
> +++ b/src/evdev-mt-touchpad.c
> @@ -1060,11 +1060,17 @@ tp_interface_device_added(struct evdev_device *device,
>   	unsigned int bus_tp = libevdev_get_id_bustype(device->evdev),
>   		     bus_trp = libevdev_get_id_bustype(added_device->evdev);
>   	bool tp_is_internal, trp_is_internal;
> +	bool want_trackpoint_pairing = false;
>
>   	tp_is_internal = bus_tp != BUS_USB && bus_tp != BUS_BLUETOOTH;
>   	trp_is_internal = bus_trp != BUS_USB && bus_trp != BUS_BLUETOOTH;
>
> -	if (tp->buttons.trackpoint == NULL &&
> +	if (tp->buttons.has_topbuttons ||
> +	    device->tags & EVDEV_TAG_TOUCHPAD_TRACKPOINT)
> +		want_trackpoint_pairing = true;
> +
> +	if (want_trackpoint_pairing &&
> +	    tp->buttons.trackpoint == NULL &&
>   	    (added_device->tags & EVDEV_TAG_TRACKPOINT) &&
>   	    tp_is_internal && trp_is_internal) {
>   		/* Don't send any pending releases to the new trackpoint */
>


More information about the wayland-devel mailing list