[PATCH libinput v2 3/3] touchpad: Add edge-scrolling support

Peter Hutterer peter.hutterer at who-t.net
Thu Nov 20 16:29:46 PST 2014


On Thu, Nov 20, 2014 at 10:34:51AM +0100, Hans de Goede wrote:
[...]
> >> +int
> >> +tp_edge_scroll_init(struct tp_dispatch *tp, struct evdev_device *device)
> >> +{
> >> +	struct tp_touch *t;
> >> +	int width, height;
> >> +	int edge_width, edge_height;
> >> +
> >> +	width = device->abs.absinfo_x->maximum - device->abs.absinfo_x->minimum;
> >> +	height = device->abs.absinfo_y->maximum - device->abs.absinfo_y->minimum;
> >> +
> >> +	switch (tp->model) {
> >> +	case MODEL_SYNAPTICS:
> >> +		edge_width = width * .07;
> >> +		edge_height = height * .07;
> >> +		break;
> >> +	case MODEL_ALPS:
> >> +		edge_width = width * .15;
> >> +		edge_height = height * .15;
> >> +		break;
> >> +	case MODEL_APPLETOUCH:
> >> +	case MODEL_UNIBODY_MACBOOK:
> > 
> > unless there's one I didn't find in my quick search, the unibodies all had
> > clickpads so we should skip this here and maybe leave a comment for that.
> 
> But keep the APPLETOUCH ?

yes, from what I remember (and quick googling seems to confirm this), the
ones with appletouch were e.g. the Core 2 Duo macbooks. Which only had one
mouse button but weren't clickpads yet.

> >> +		edge_width = width * .085;
> >> +		edge_height = height * .085;
> >> +		break;
> >> +	default:
> >> +		edge_width = width * .04;
> >> +		edge_height = height * .054;
> > 
> > make MODEL_SYNAPTICS the same as default please
> 
> So use .04 and .054 for synaptics too, and drop the SYNAPTICS case ?

yes please.
It might be worth mentioning in a comment that for the *40 series, the edges
are the absolute edges (not the recommended edges), but since libinput
doesn't care about clickpad edges we ignore them here.

Cheers,
   Peter


More information about the wayland-devel mailing list