diff --git a/src/evdev-mt-touchpad-edge-scroll.c b/src/evdev-mt-touchpad-edge-scroll.c index aa9197f0..bb3890c1 100644 --- a/src/evdev-mt-touchpad-edge-scroll.c +++ b/src/evdev-mt-touchpad-edge-scroll.c @@ -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;