mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-27 01:00:06 +01:00
touchpad: make the edge-scroll edge 7mm wide
Rather than magic percentages of the touchpad axis ranges, make it a fixed size of 7mm. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
3948cb9048
commit
206a4bf441
1 changed files with 3 additions and 22 deletions
|
|
@ -285,30 +285,11 @@ 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.dimensions.x;
|
||||
height = device->abs.dimensions.y;
|
||||
|
||||
switch (tp->model) {
|
||||
case MODEL_ALPS:
|
||||
edge_width = width * .15;
|
||||
edge_height = height * .15;
|
||||
break;
|
||||
case MODEL_APPLETOUCH: /* unibody are all clickpads, so N/A */
|
||||
edge_width = width * .085;
|
||||
edge_height = height * .085;
|
||||
break;
|
||||
default:
|
||||
/* For elantech and synaptics, note for lenovo #40 series,
|
||||
* e.g. the T440s min/max are the absolute edges, not the
|
||||
* recommended ones as usual with synaptics.
|
||||
*/
|
||||
edge_width = width * .04;
|
||||
edge_height = height * .054;
|
||||
break;
|
||||
}
|
||||
/* 7mm edge size */
|
||||
edge_width = device->abs.absinfo_x->resolution * 7;
|
||||
edge_height = device->abs.absinfo_y->resolution * 7;
|
||||
|
||||
tp->scroll.right_edge = device->abs.absinfo_x->maximum - edge_width;
|
||||
tp->scroll.bottom_edge = device->abs.absinfo_y->maximum - edge_height;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue